Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dwayne A 97 posts 117 karma points
    Mar 01, 2011 @ 18:49
    Dwayne A
    0

    tinyMCE and insert media - tidy error when saving

    Not only this, it strips the editor of all content. Users need to choose and embed YouTube vids on their pages. They have a library at youtube.com, so inserting the URL or embedding the html in tinyMCE insert media datatype would be ideal - if it works.

    Does anyone have a fix for this, or do I need to work around with a macro, params, and xslt?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 01, 2011 @ 20:48
    Jan Skovgaard
    0

    Hi Dwayne

    What kind of error do you get when saving? And apart from the youtube video what else media do you have issues inserting?

    I think you could might benefit from using the uTube package for the youtube videos perhaps?

    Otherwise it's a matter of using a textfield to copy/paste the code into rather than the RTE field.

    However you can probably disable tidy in the umbracoSettings.config file in the config folder, but then bad markup is allowed in it, which is not always a good idea. But of course depends on the situation.

    Hope this helps.

    /Jan

  • Dwayne A 97 posts 117 karma points
    Mar 02, 2011 @ 09:36
    Dwayne A
    0

    Hi Jan,

    For the sake of clarity, I am using the Insert Media button and am simply pasting a URL to a video at youtube.com. Upon pasting the YouTube feed URL into the URL/media file text field, the video is immediately visible in the preview window. After choosing OK, there is a visible Flash placeholder in the wysiwig editing area. It's when saving, that things berak down. Upon saving, all markup is removed and "[tidy error]" is all that remains.

    Not sure what you are suggesting here: "Otherwise it's a matter of using a textfield to copy/paste the code into rather than the RTE field."

    Disabling Tidy is not the route I want to go.

    I found that implementing the following hard-coded URL in XSLT and then injecting the macro in the wysiwig does the trick...

        <xsl:text disable-output-escaping="yes">
          <![CDATA[
    <embed height="385" type="application/x-shockwave-flash" width="640"
    src="http://www.youtube.com/v/abc;rel=0"
    allowscriptaccess="always" allowfullscreen="true"></embed>

          ]]>
        </xsl:text>
      </xsl:template>

    ...however, I've looked at creating parameters on a macro, and cannot get my head around it. There's a need for the creation of a unique URL, width, height params and so on to tie this with the XSLT. I don't know how to write the xslt to capture the macro params I create. I've created a parameter on the macro called url, and tried

    <embed height="385" type="application/x-shockwave-flash" width="640" src="{$url}"
    allowscriptaccess="always" allowfullscreen="true"></embed>

    What am I missing in the xslt? How do I capture the variables on the macro?

  • Candice K 1 post 21 karma points
    Mar 23, 2012 @ 20:01
    Candice K
    0

    Hi Dwayne,

    I see that this was over a year ago, but can you remember the fix you had for this? I am haveing the same issue. Trying to embed HTML5 video. Shows the placeholder on insert but once saved, deletes all RTE content and replaces with [tidy error].

    Thanks, CK

  • Dwayne A 97 posts 117 karma points
    Mar 23, 2012 @ 20:34
    Dwayne A
    0

    Hey Candice,

    I had to take a peak at that site to find out how I solved the issue. I ended up installing the [uTube] Classic Player. Not certain that can help you out, seeing as you are working HTML 5 vids.

    If it helps at all, prior to installing the package I did manage creating all the embed data in an XSLT file as I've shown above, I ended up solving the parameter issue by creating simple dataTypes for my users to fill in and passed the url and other params like width and height through text strings to the xslt. That worked well. In the end I chose the plugin simply because it was much more elegantly developed than what I could come up with, and it provides skinning as well. You'll find it here on CodePlex: http://utube.codeplex.com/

    If you're looking for another solution, maybe CodePlex has that as well. Good luck.

  • David Bartholomew 2 posts 22 karma points
    Aug 09, 2013 @ 22:41
    David Bartholomew
    0

    I had the same issue and ended up hard coding the embed code into the page template...not ideal.

Please Sign in or register to post replies

Write your reply to:

Draft