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

Rad Editor Strips Back Ground Image and JS

2 Answers 13 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Platinum
Top achievements
Rank 1
Platinum asked on 27 Aug 2014, 12:21 PM
Hi I am using the RadEditor for SharePoint 2010.

I am using the following html in RadEditor

<style>.maincontent     { color:#fff; padding:30px; width:100%; height:34.444em; margin-top:0;background:url(/Partner-Us/PublishingImages/banner.jpg) no-repeat top left;} </style> <div class="maincontent"> Sample Content  </div>

in my RadEditor i have the following setting

               <radE:RadHtmlField id="PageContent"  FieldName="PublishingPageContent" runat="server" AllowScripts="true" AllowSpecialTags="true">
            </radE:RadHtmlField>

But still it strips the background image. I happens for the javascript also, any solution to overcome this ?

2 Answers, 1 is accepted

Sort by
0
Platinum
Top achievements
Rank 1
answered on 27 Aug 2014, 02:35 PM
i am using rad editor version 2014.1.403.35
0
Ianko
Telerik team
answered on 28 Aug 2014, 08:03 AM
Hi,

What happens is that only the background:url(/Partner-Us/PublishingImages/banner.jpg) no-repeat top left; is stripped. This behavior do not come from RadEditor logic, this is due to SharePoint's security matter described in this blog.

Investigating the saved HTML content you will see that the HTML and the CSS are correctly submitted, only due to the white color of the text it appears merged with the white background. You can test with a background-color property instead to examine different results.

As for the scripts, the AllowScripts="true" AllowSpecialTags="true" properties are obsolete and to enable using script tags you should disable the RemoveScripts and EncodeSripts filters. More details about how to configure the ContentFilters property is available in this demo, where you can also test the results from different configurations scenarios.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Platinum
Top achievements
Rank 1
Answers by
Platinum
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or