This is a migrated thread and some comments may be shown as answers.

<IFRAME> in MOSS radEditor

7 Answers 148 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
John Way
Top achievements
Rank 1
John Way asked on 10 Aug 2007, 01:39 PM
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

7 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 10 Aug 2007, 02:32 PM
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
0
John Way
Top achievements
Rank 1
answered on 10 Aug 2007, 05:59 PM
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
0
Georgi Tunev
Telerik team
answered on 13 Aug 2007, 11:31 AM
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
0
John Way
Top achievements
Rank 1
answered on 13 Aug 2007, 02:21 PM
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
0
Georgi Tunev
Telerik team
answered on 13 Aug 2007, 02:44 PM
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
0
domack
Top achievements
Rank 1
answered on 16 May 2008, 12:02 PM
(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

0
John Way
Top achievements
Rank 1
answered on 16 May 2008, 12:21 PM
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
Tags
WebParts for SharePoint
Asked by
John Way
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
John Way
Top achievements
Rank 1
domack
Top achievements
Rank 1
Share this question
or