Unwanted auto-formatting on snippet insert

3 posts, 0 answers
  1. Luuk
    Luuk avatar
    2 posts
    Member since:
    Jul 2014

    Posted 08 Jul 2014 Link to this post

    I have the following (simplified) snippet defined in my toolsfile:

    <snippet name="Test">
            <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-rspace:10pt">
                    <td valign="bottom">Image here</td>
                    <td bgcolor="#ffffff" style="background-color:#ffffff; font-family:Arial, Helvetica, Sans Serif; font-size:12px; line-height:16px; color:#000000; padding:0 20px;">
                        <a href="#" style="color:#78348c;">Read on &#9658;</a>

    When inserting this snippit, two issues emerge:
    1. The style="mso-table-rspace:10pt" attribute is removed from the table tag
    2. After 'read on' there is a HTML character with code 9658 (which displays an arrow). How ever on insert, the character is not inserted with the character code (like &#9658;), but as the character itself. This renders incorrectly in Outlook. In fact, inserting the above code example here did exactly the same thing.

    StripFormattingOnPaste and StripFormattingOptions are both set to none, ContentFilters are set to: RemoveScripts,ConvertFontToSpan,FixUlBoldItalic,IECleanAnchors,FixEnclosingP,ConvertTags,ConvertFontToSpan,OptimizeSpans,IndentHTMLContent.

    What else can I do to fix this issue?

  2. Ianko
    Ianko avatar
    1507 posts

    Posted 10 Jul 2014 Link to this post

    Hello Luuk,

    Setting the same content filters which you listed, the stripping of the mso-table-rspace:10pt style is not reproducible. If the ConvertToXhtml filter is enabled, then it is stripped, because it is not valid upon XHTML specifications.

    You can examine the results on my end with this screencast.

    The behavior with the arrow is due to native browser replacement. It is expected browser to replace the entities to characters and if you use the same content in a plain HTML page you will see the same results as in design mode by inspecting the HTML via the browser's dev toolbar.

    The RadEditor has a built-in filter that converts character to entities, although such such scenario should be handled with a custom content filter.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
  4. Luuk
    Luuk avatar
    2 posts
    Member since:
    Jul 2014

    Posted 11 Jul 2014 in reply to Ianko Link to this post

    Hello Ianko,

    Thank you for your elaborate post. It was good to know that with the given content filter it should work. So I dug a little deeper and I found the culprit: someone had also set the content filters programmatically, overruling my content filters. So when I removed that line of code it worked fine. Thanks you!

    I'll look into custom content filters soon.

    Thanks again!
Back to Top