RadEditor clears expando properties

6 posts, 0 answers
  1. Geoff Ballard
    Geoff Ballard avatar
    27 posts
    Member since:
    Mar 2010

    Posted 07 Sep 2011 Link to this post

    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?
  2. Rumen
    Admin
    Rumen avatar
    14028 posts

    Posted 08 Sep 2011 Link to this post

    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 >>

  3. Geoff Ballard
    Geoff Ballard avatar
    27 posts
    Member since:
    Mar 2010

    Posted 08 Sep 2011 Link to this post


    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>
  4. Rumen
    Admin
    Rumen avatar
    14028 posts

    Posted 08 Sep 2011 Link to this post

    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 >>

  5. Geoff Ballard
    Geoff Ballard avatar
    27 posts
    Member since:
    Mar 2010

    Posted 08 Sep 2011 Link to this post

    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.
  6. Rumen
    Admin
    Rumen avatar
    14028 posts

    Posted 13 Sep 2011 Link to this post

    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.
Back to Top