Copied to clipboard

Flag this post as spam?

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


  • Mike 81 posts 101 karma points
    Mar 05, 2012 @ 20:39
    Mike
    0

    iFrame not showing up in rich text editor

    I pasted iFrame code via the HTML view in the rich text editor. It shows up in the design view. 

    However, when I go back to the HTML view everything is gone. When I go to the website, the iframe is not showing up. Is there a setting I need to allow this to work right?

     

    Thanks for the assistance.

    Mike

  • Mike 81 posts 101 karma points
    Mar 05, 2012 @ 20:57
    Mike
    0

    I tried to edit my forum post. However I am getting an xslt error. So I will just append it...

     

    I pasted iFrame code via the HTML view in the rich text editor. It shows up in the design view. 

    However, when I save and publish then I go back to the HTML view everything is gone. When I go to the website, the iframe is not showing up. Is there a setting I need to allow this to work right?

    I am using the standard iFrame code to embed a google map. 

    Thanks for the assistance.

    Mike

  • Mike Chambers 636 posts 1253 karma points c-trib
    Mar 06, 2012 @ 10:24
  • Mike 81 posts 101 karma points
    Mar 08, 2012 @ 05:36
    Mike
    0

    Hey Mike,

    I checked out the link and I added it to the config. However it's still not working. Any thoughts why? Seems like it should. I even did a iis reset to make sure it wasn't somehow not reading the new xml doc

     

  • Mike 81 posts 101 karma points
    Mar 08, 2012 @ 19:22
    Mike
    0

    I found this as well. Jan can you tell me why it is not recommended to do the below? Also any other work arounds?

    Is there a way to make a page and use it as a macro?

     

    From Jan

    In order to get this to work you will need to set tidy to false in the umbracoSettings.config though, which is not neccesarily recommended to do.

  • Mike Chambers 636 posts 1253 karma points c-trib
    Mar 09, 2012 @ 10:35
    Mike Chambers
    0

    tidy is a second level of cleansing on the html... we've been running 100+ sites with it turned off with and haven't seen any issues ;-) 

    I wonder if it's a legacy feature from when tinymce implementations didn't do such a good job of cleansing? or actually pre tinymce when the richtext editor used a wysiwyg other than tinymce?

  • Muhammad Humayun 49 posts 79 karma points
    Mar 12, 2012 @ 18:53
    Muhammad Humayun
    0

    Have anybody found a solution to it?

  • MarkD 5 posts 26 karma points
    Apr 26, 2012 @ 13:39
    MarkD
    0
  • Mike 81 posts 101 karma points
    May 01, 2012 @ 05:25
    Mike
    0

    Hey MarkD, I implemented your solution. There seems to be a major issue happening when it comes to the iframe. It seems to somehow create massive havic.

    Anything past the closing iframe tag is ignored. Viewing the source, it all looks correct. Also my jquery menu bombs, the script is called at the end of the main template thus, it's definitly the iframe macro keeping any of the HTML to be rendered.

    Are you experiencing any of these issues?

  • Paul Blair 466 posts 731 karma points
    May 01, 2012 @ 06:07
    Paul Blair
    0

    I prefer to render elements like iFrames (e.g. for youTube embeds) as macros. i.e. you could create a macro that renders the iFrame in a macro. If the src is dynamic it can be passed as a parameter to the macro. This also negates the need for your content editors to know anything about iFrames.

    Cheers

    Paul

  • Mike Chambers 636 posts 1253 karma points c-trib
    May 01, 2012 @ 10:08
    Mike Chambers
    1

    Probably moving away from the post main thread now... but I find using macros in the richcontent area a bit hit and misss... first you have to explain the "aw snap" issues with Chrome to the client, then you sometimes end up with random <p></p> tags before and/or after the rendered macro content at the front end.

    If the macros are utilised in templates then all seems fine... it is just macros in the RTE that exhibit strange goings on.

  • Mike 81 posts 101 karma points
    May 01, 2012 @ 17:49
    Mike
    0

    Hi Paul,

    MarkD submitted the following code. However there were issues.

    @Paul - Was the below the same as you were referring to?

    @Mike - Can you elaborate a bit more on your solution?

     

     Part A: Create the XSLT File and Macro

    1) Create a New Clean XSLT File and tick Create Macro.

    2) Give the Macro a Name, such as: Vimeo IFrame Embedd for Vimeo Universal Player

    3) Paste in the following Code:

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]><xsl:stylesheet  version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library"> <xsl:output method="xml" omit-xml-declaration="yes"/><xsl:param name="currentPage"/><xsl:variable name="location" select="/macro/location"/><xsl:variable name="width" select="/macro/width"/><xsl:variable name="height" select="/macro/height"/><xsl:template match="/"><iframe src="{$location}" width="{$width}" height="{$height}"></iframe></xsl:template></xsl:stylesheet>

    Part B: Add Paramaters to the Macro

    1) Save your XSLT file.

    2) Go to the Macro Section and in the new macro add the following 3 paramaters, all of which are of Type text:

    Alias and Name:

    locationwidthheightTick "Use In Editor"

    3) Save the Macro

    Part C: Using the Macro to Embedd the Vimeo Video on the Umbraco Page

    1) Go to the umbraco content page you want to embedd the iframe video on to.

    2) Click on the Macro button and select the new macro from the drop down.

    3) For the location, paste in the URL of the Video. Such as: http://player.vimeo.com/video/40514689 (Which you get from your IFrame Code)

    5) Enter your required width and height.

    6) Save and Publish your page. You will need to log out of Vimeo to test this or the Vimeo page will open instead of the video.

  • Mike 81 posts 101 karma points
    May 01, 2012 @ 19:09
    Mike
    0

    Hey Mike Chambers, I implemented your solution and I am getting the same results where the iframe code is somehow stopping the rendering of any further HTML.

    Anyone have any thoughts?

  • Mike 81 posts 101 karma points
    May 01, 2012 @ 19:21
    Mike
    0

    Figured it out!!!!

    Add some text before the ending iframe tag. This forces the tag to render.

    <iframe src="{$location}" width="{$width}" height="{$height}">
      Your browser doesn't support frames.
      </iframe>
  • Paul Blair 466 posts 731 karma points
    May 01, 2012 @ 22:34
    Paul Blair
    0

    changing the xsl:output method to HTML probably would have worked as well

  • Mike 81 posts 101 karma points
    May 01, 2012 @ 22:56
    Mike
    0

    Thanks Paul! That did work as well.

     

  • Mark Downie 8 posts 28 karma points
    May 03, 2012 @ 09:52
    Mark Downie
    0

    Hi Mike and Paul,

    That is great. This works for me.

    Thanks,
    Mark

  • Mike Chambers 636 posts 1253 karma points c-trib
    May 03, 2012 @ 10:12
    Mike Chambers
    0

    FYI, another method to stop self closing of divs in xslt macros...

    {iframe}{xsl:value-of select="normalize-space('')"/}{/iframe}

  • Connie DeCinko 931 posts 1160 karma points
    Aug 14, 2012 @ 17:42
    Connie DeCinko
    0

    Bottom line, the version of TinyMCE/Tidy that ships with Umbraco 4.7 is broken by not allowing iframes even though they are allowed in the TinyMCE config.  Tidy should not be stripping out the empty iframe tag.  And, TinyMCE should not be removing content inside the iframe tag, which is your no frames content.

     

Please Sign in or register to post replies

Write your reply to:

Draft