RadEditor Moving Article HTML5 tag

Posted by Community Admin on 04-Aug-2018 13:45

RadEditor Moving Article HTML5 tag

All Replies

Posted by Community Admin on 13-Jun-2014 00:00

Hi -

Within SF 7, we have a content block that looks like:

<div> <input type="radio" name="accordion-1" id="ac-2"> <label for="ac-2">operate a shared use  lock</label> <article class="ac-larges"> <p><iframe width="100%" height="400" frameborder="0" align="middle" src="http://www.test.com/index.html" scrolling="no"></iframe></p> </article> </div>

It works the first time you save the RadEditor window. However, when you go back in, the closing article tag is moved right behind the opening article tag like this:

<div> <input type="radio" name="accordion-1" id="ac-2"> <label for="ac-2">operate a shared use lock</label> <article class="ac-larges"> </article> <p><iframe width="100%" height="400" frameborder="0" align="middle" src="http://www.test.com/index.html" scrolling="no"></iframe></p> </div>

How can we prevent RadEditor from moving this code? It breaks our content every time?

Thanks,

Greg

Posted by Community Admin on 17-Jun-2014 00:00

Hello Greg, 

The issue that you mentioned is caused because this is the default behavior of the RadEditor. The RadEditor by default modifies the content of the HTML5 tags in order to keep the support of the old browsers. If you want to prevent this behavior you can try the following:

1) Download the attached files, extract the archive and add the files inside your SitefinityWebApp project

2) Go to your site’s Administration > Settings > Advanced page and open the Controls > ViewMap node. Create a new entry and for the HostType, enter Telerik.Sitefinity.Web.UI.Fields.HtmlField. Then enter the path to your custom template file in the LayoutTemplatePath property. 

If you need any additional information on this matter please do not hesitate to ask


Regards,
Elena Ganeva
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 04-Dec-2014 00:00

Thank you Elena, this fixed the issue for us mostly, however, if we use the rad editor's code snippet drop down (toolsfile.xml) to drop some HTML into the page and that HTML has an HTML5 element in it, it sill will move the closing tag to right after the opening tag. If you manually correct it, then the rad editor doesn't move your tag again, but is there a way to prevent this from happening when initially dropping in HTML from the code snippet drop down? Thanks!!

This thread is closed