Hi,
Using RadControls for ASP.NET AJAX version 2007.3 1425 (Feb 25, 2008) and Internet Explorer 7 (version 7.0.5730.13), I am trying to paste a flash element in the RadEditor with the following clientside script:
var ieFilter = editor._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
var ffFilter = editor._filtersManager.getFilterByName("MozillaKeepFlashString");
if (ieFilter) strXhtml = ieFilter.getDesignContent(strXhtml);
if (ffFilter) strXhtml = ffFilter.getDesignContent(strXhtml);
editor.pasteHtml(strXhtml);
Before this code is executed, the strXhtml variable contains the following xhtml:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" title="" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash"><param name="movie" value="/MediaFile.axd?Id=165&t=091027133557"></param><param name="quality" value="high"></param><param name="bgcolor" value="#FFFFFF"></param><embed src="/MediaFile.axd?Id=165&t=091027133557" quality="high" bgcolor="#FFFFFF" title="" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>
The string that is passed to the pasteHtml method contains the following:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" title="" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash"><rade_param name="movie" value="/MediaFile.axd?Id=165&t=091027133557"></rade_param><param name="movie" value="/MediaFile.axd?Id=165&t=091027133557"></param><rade_param name="quality" value="high"></rade_param><param name="quality" value="high"></param><rade_param name="bgcolor" value="#FFFFFF"></rade_param><param name="bgcolor" value="#FFFFFF"></param><embed src="/MediaFile.axd?Id=165&t=091027133557" quality="high" bgcolor="#FFFFFF" title="" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>
After this html is pasted I switch to html mode where I see the following:
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="100" width="100" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" xlink:title="Testflash" xlink:href="8-165-o" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" href="null">
<param name="movie" value="/MediaFile.axd?Id=165&t=091027133557">
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF"><embed src="/MediaFile.axd?Id=165&t=091027133557" quality="high" bgcolor="#FFFFFF" title="" width="100" height="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>
When I postback the page and access the RadEditor's Content property this contains the same (except that the order of some attributes is different).
I see several differences between the content I originally pasted and the content that is posted:
- the title="" attribute has been removed from the <object> element (not a big problem).
- a href="null" attribute has been added to the <object> element (not a big problem though I doubt that this is comform the xhtml specification).
- the <param> tags are no longer closed. This is a problem since the content is not valid xhtml anymore, and I cannot parse it with an xml parser (which I need to do).
How can I solve this issue? Thanks for any help!
