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

HTML Getting Changed when inserted to editor

2 Answers 72 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 02 Jul 2012, 07:28 PM
I am working with HTML that embeds a video, here is what I would like to edit:

<p><asset id="705277"><!-- BroadcastDEVPlayer --><div style="display: none;"><!--div--></div><!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/.  --><script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"><!--script--></script><object id="myExperience1716942643001" class="BrightcoveExperience"><param name="bgcolor" value="#FFFFFF"><!--param--></param><!--p--><param name="width" value="640"><!--param--></param><param name="height" value="390"><!--param--></param><param name="playerID" value="1686393367001"><!--param--></param><param name="playerKey" value="AQ~~,AAAABvZFG8E~,tuqDbg7x3grEeW3gQXG_DLcv5dBdNd_2"><!--param--></param><param name="isSlim" value="true"><!--param--></param><param name="dynamicStreaming" value="true"><!--param--></param><param name="@videoPlayer" value="1716942643001"><!--param--></param></object><!-- This script tag will cause the Brightcove Players defined above it to be created as soon as the line is read by the browser. If you wish to have the player instantiated only after the rest of the HTML is processed and the page load is complete, remove the line.  --><script type="text/javascript">brightcove.createExperiences();</script><!-- End of Brightcove Player --></asset></p><p />

However, when I view the HTML that actually got inserted to the editor, everything that should have been enclosed by the p and asset tags got moved outside them.  What is causing it and what can I do to prevent it?  I have experimented with turning off filters, but that doesn't seem to help.

<p><asset id="705277"><!-- BroadcastDEVPlayer --></asset></p><div style="display: none;"><!--div--></div><!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/.  --><script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"><!--script--></script><object type="application/x-shockwave-flash" data="http://c.brightcove.com/services/viewer/federated_f9?&amp;width=640&amp;height=390&amp;flashID=myExperience1716942643001&amp;bgcolor=%23FFFFFF&amp;playerID=1686393367001&amp;playerKey=AQ~~%2CAAAABvZFG8E~%2CtuqDbg7x3grEeW3gQXG_DLcv5dBdNd_2&amp;isSlim=true&amp;dynamicStreaming=true&amp;%40videoPlayer=1716942643001&amp;autoStart=&amp;debuggerID=&amp;startTime=1341257000939" id="myExperience1716942643001" width="640" height="390" class="BrightcoveExperience" seamlesstabbing="false"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="seamlessTabbing" value="false"><param name="swliveconnect" value="true"><param name="wmode" value="window"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF"></object><!-- This script tag will cause the Brightcove Players defined above it to be created as soon as the line is read by the browser. If you wish to have the player instantiated only after the rest of the HTML is processed and the page load is complete, remove the line.  --><script type="text/javascript">brightcove.createExperiences();</script><!-- End of Brightcove Player -->

Thanks,
Igor

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Jul 2012, 03:40 PM
Hi,

RadEditor is an XHTML editor based on the rich text editing engine of the browser under which it operates. The reported scenario is not supported because the asset XML tag is not part of the HTML/XHTML specification and the browser modifies it on its own.

If you provide namespaces for the custom tags and disable the ConvertToXhtml filter, the XML content will be less mangled, but again will be modified by the browser.

You can test your custom code with an editable iframe as this in the attached file and see how it is changes under the different browsers.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Igor
Top achievements
Rank 1
answered on 03 Jul 2012, 05:47 PM
Thanks, that's very helpful information!

Igor
Tags
Editor
Asked by
Igor
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Igor
Top achievements
Rank 1
Share this question
or