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

RadEditor clears expando properties

5 Answers 87 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Geoff Ballard
Top achievements
Rank 1
Geoff Ballard asked on 07 Sep 2011, 01:40 PM
Hi,
We're using this editor with html that contains a number of expando attributes.  The actual HTML elements are SPAN tags.  The problem is that when we style these tags, i.e. change font size, all of the expando attributes are cleared.

I tried using the OnClientCommandExecuting event to grab all attributes and the OnClientCommandExecuted event to re-apply them.  Unfortunately it seems to be after the "Executed" event that the attributes are removed.

Is there a way to prevent this behaviour or to hook into a later event to re-apply these expando attributes?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 08 Sep 2011, 02:31 PM
Hi Geoff Ballard,

Could you please paste the exact HTML content that you load in RadEditor so that I can examine it and tell you whether the reported problem is a browser behavior or is due to the content filters of RadEditor?

Regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Geoff Ballard
Top achievements
Rank 1
answered on 08 Sep 2011, 02:53 PM

I guessed it was due to your XHTML parsing.  Setting  ContentFilters="None" solved the problem, although it was unfortunate to lose the HTML parsing as that tidied up the markup.

The HTML before was:

<SPAN id=ctl2011871315389058413 class=editorfield contentEditable=false unselectable="false" Required="false" Editable="false" DataType="Text" sprocOrTabName="GetTop1Contact" cttype="bound" FieldName="ContactID" Visible="true">ContactID</SPAN>

And after changing the font-size:

<span class="editorfield" id="ctl2011871315389058413" style="font-size: 14px;">ContactID</span>
0
Rumen
Telerik team
answered on 08 Sep 2011, 03:35 PM
Hello Geoff,

I was unable to reproduce the problem in IE9 and Firefox 6 with enabled ConvertToXhtml filter. You can see my test in the following video: http://screencast.com/t/Dpe4nwG0. Are you able to reproduce the issue in the Built-in Content Filters demo?

Best regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Geoff Ballard
Top achievements
Rank 1
answered on 08 Sep 2011, 04:04 PM
Yes I just recreated it in the online demo you listed,  at least within IE 8; Firefox behaves diferently with control selection.  If you paste in the first SPAN tag I added into the "HTML" view.  Then in the "Design" view select that tag and use the dropdown box to change the font size.  Then, when you look at the "HTML" view again you'll see that the expando attributes are gone.
0
Rumen
Telerik team
answered on 13 Sep 2011, 12:18 PM
Hello Geoff,

I was able to reproduce the IE8 problem and I was able to fix it only by disabling the content filter.

All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Geoff Ballard
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Geoff Ballard
Top achievements
Rank 1
Share this question
or