Word 2007 Formatting Not Stripped Under IE 10

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Apr 2014

    Posted 08 Jul 2014 Link to this post

    We recently upgraded our Telerik controls to version Q1 2014 and are now having some trouble with stripping Word 2007 formatting under IE10.  You can see the problem on the Telerik demo page (http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx).  When I paste in some text from Word 2007 into the editor loaded on IE 10 with MSWordConvertAll I get this:

    <span><strong><em><span style="font-size: 10pt; font-family: 'Verdana','sans-serif'; color: #4f81bd;"><w:Sdt id="-254595406" title="Show Link" DocPart="B1FE264F85054FCB889BE45DC801997A"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';">inconsequential, toe fractures that are improperly managed can lead to significant pain and disability. Treatment is generally straightforward, with excellent outcomes. <w:Sdt id="-254595406" title="Show Link" DocPart="07A86A9329474E549AD4270D9993B428">(<w:sdtPr></w:sdtPr><w:Sdt id="-254595403" DocPart="07A86A9329474E549AD4270D9993B428"><a href="http://localhost:4342/Graphic/Preview.aspx?graphicId=51289" title="Subacute or chronic weakness" target="_utdGraphicPreview"><span style="color: #0000ff;">algorithm 1</span></a><w:sdtPr></w:sdtPr><w:Sdt id="-254595399" DocPart="7D6DB96CCC274B7ABDF60C3ED5A7FD04" SdtTag="51289" ShowingPlcHdr="t"></w:Sdt></w:Sdt>)</w:Sdt></span></w:Sdt></span></em></strong></span>

    As you can see, while the raw text is okay, the Word content controls are no longer converted, which is causing some trouble for our OnPaste handler.  Is there a setting I'm missing or is this a regression, or is this combination of Word 2007/IE 10 no longer supported?

  2. Ianko
    Ianko avatar
    1510 posts

    Posted 11 Jul 2014 Link to this post

    Hi David,

    The described behavior is already discussed in an official ticked thread opened to us. In case of further assistance needed I would like to ask you to continue the conversation in the official ticket, so that we could examine the provided information more accurately.

    For everyone else interested on this matter. 

    This issue occurs because content controls in Word are elements that can be successfully pasted only in IE. In other browsers, they are stripped by the default pasting functionality of the browser.

    In RadEditor the Clean Word Formatting functionality is not designed to detect these Word elements and it appears that in IE they show up in the HTML as tags. 

    To resolve the issue you can further customize the clearInvalidHtml() method to strip undesired tags on pasting. The following example shows how to strip the <w:sdtPr> tags:
    <telerik:RadEditor ID="RadEditor1" runat="server">
    <script type="text/javascript">
        var clearInvalidHtml = Telerik.Web.UI.Editor.Utils.clearInvalidHtml;
        Telerik.Web.UI.Editor.Utils.clearInvalidHtml = function (html) {
            var cleanHtml = clearInvalidHtml.call(this, html);
            cleanHtml = cleanHtml.replace(/<\/?[w]:[^>]*?>/gi, "");
            return cleanHtml;


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