<IFRAME> in MOSS radEditor

8 posts, 0 answers
  1. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 10 Aug 2007 Link to this post

    I am trying to create an IFRAME within a radEditor WCM field control, but it is getting stripped out when I publish the page.

    I have ALLOWSCRIPTS=TRUE in config.xml and I have ALLOWSPECIALTAGS=TRUE in the RadE:radEditorField control in my page layout.

    Is there a workaround?

    Thanks,
    John
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 10 Aug 2007 Link to this post

    Hi John,

    With the current version unfortunately there is no workaround - the good news however, is that in the next update, this problem will be fixed.

    The reason for this behavior is that the MOSS has a filter that searches the content and remove "bad" tags like <scripts> <iframe> etc. Unfortunately we don't have access to this filter and we don't know all the tags that it searches for. That is why we need to "face the problem" first and then add the tag in our list so we can encode it.

    Let us know if you face any other problems like this under MOSS. This will help us to find and fix them before the next update.




    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  3. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 10 Aug 2007 Link to this post

    Thanks for the info. I have a couple questions and another task that we aren't currently able to do in the MOSS radEditor.

    Q1: When will the new version be released?
    Q2: Will upgrading to the new version break our existing content or can we simply swap out the SharePoint solution? (.wsp file)

    The other issue we've encountered is <div style="background-image:(url(image.jpg)">test</div> gets stripped to <div>test</div>. Other attributes are fine (width, height, background-color).

    Thanks,
    John
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Aug 2007 Link to this post

    Hi John,
    Up to your questions:
    1. At this point I cannot tell you the exact date of the next update as it hasn't been set yet. Nevertheless if you open a new support ticket and put a link to this forum thread in it, I will send you a new build where the problem with the IFRAME is fixed.
    2. This problem is not related to the RadEditor control itself but the way the browser handles incorrect code - you have one extra bracket - "<div style="background-image:(url(image.jpg)">test</div>". When IE encounters such code it strips it and the RadEditor cannot control this. You can test that for yourself by using the page that I attached to this thread. As you will see, there are no controls in it - just simple HTML. Put your code in the upper textarea and push the button to update the div. After that press the "Show innerHTML" button to see the result.




    Best wishes,

    Georgi Tunev

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  5. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 13 Aug 2007 Link to this post

    I see what you mean about the IE behavior, but even if I correct the code to where IE doesn't strip it, MOSS still strips the background-image attribute.
    <div style="background-image:url(image.jpg)">test</div>
    becomes
    IE: <DIV style="BACKGROUND-IMAGE: url(image.jpg)">test</DIV>
    SharePoint: <div>test</div>

    Thanks,
    John
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Aug 2007 Link to this post

    Hi John,

    Unfortunately this problem comes from the MOSS itself again and we cannot fix it directly. If you need to put an image as a background however, you can use the same approach as with the <script> issue:


    <div id="picdiv" style="BACKGROUND-IMAGE: url(test.jpg)">test</div><script> document.getElementById("picdiv").style.backgroundImage = "url(test.jpg)"</script> 




    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. domack
    domack avatar
    16 posts
    Member since:
    Aug 2007

    Posted 16 May 2008 Link to this post

    (1.)  About the IFRAME problem. You say there is a fix available for this? Or should it be fixed by now in the version we are using (4.5.1.0). I tried using IFRAME's but without any luck.

    Appreciate a prompt answer.

    Regards, Marcus

  8. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 16 May 2008 Link to this post

    It was working in 4.3.2 and I just checked and verified that it is still working in 4.5.3.

    Make sure your don't have some other "bad" code that is causing the iframe to be stripped out as an innocent bystander. Remove everything but the iframe and try it by itself.

    Here is the syntax I used
    <iframe src=http://www.google.com width="600" height="400" /> 

    Hope this helps,
    John
Back to Top