CTRL + V - Paste and clean does not work in IE 11

8 posts, 0 answers
  1. Leon Gelbak
    Leon Gelbak avatar
    19 posts
    Member since:
    Sep 2003

    Posted 31 Jul 2014 Link to this post

    Hi,

    When pasting content from MS Word in Chrome, FF and IE 11, I am prompted with a popup which suggests to clean the content as it comes from Word. In Chrome and FF it comes in clean, however in IE 11, it seems that even if you choose to clean it, it comes in with extra html. I would expect that pasting would end up with the same results regardless of the browser?

    Thanks,

    Leon
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 04 Aug 2014 Link to this post

    Hello Leon,

    Could you provide an example MS Word file with the content used?

    On my end, using this online demo, pasting of MS Word under IE11 results exactly the same as in Firefox and Chrome.

    Regards,
    Ianko
    Telerik
     

    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Leon Gelbak
    Leon Gelbak avatar
    19 posts
    Member since:
    Sep 2003

    Posted 04 Aug 2014 in reply to Ianko Link to this post

    Hi,

    I have sent an email with the file as I am not allowed to post MS Word file attachments.

    Thanks,

    Leon
  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 05 Aug 2014 Link to this post

    Hi Leon,

    I am unable to find the sent files.

    If you are concerned about the publicity and the files should not be available in the public, you can open a proper support thread and provide the internally by attaching them to the support ticket as zip archive.

    If by not allowed, you mean that you cannot attach docx , rtf, doc etc. file extensions, you can just add them to a zip file and attach it to your message. 

    Regards,
    Ianko
    Telerik
     

    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.

     
  6. Leon Gelbak
    Leon Gelbak avatar
    19 posts
    Member since:
    Sep 2003

    Posted 07 Aug 2014 in reply to Ianko Link to this post

    Hi,

    The system does not allow me to upload a zip file. the only extensions allowed are gif, jpg, jpeg and png. How can I get the file to you? I already tried emailing.

    Kind regards,

    Leon
  7. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 11 Aug 2014 Link to this post

    Hello Leon,

    After some further searching through the mailbox I was able to find the mentioned MS Word file. I tried to reproduce the issue with it, but to no avail. 

    You can examine my tests with this screencast, as you can see, in both Firefox and IE11 the results are almost the same, and I am unable to identify any  unneeded HTML or specific XML-based content. Please let me know if I am missing something important to reproduce the issue.

    Regards,
    Ianko
    Telerik
     

    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.

     
  8. Leon Gelbak
    Leon Gelbak avatar
    19 posts
    Member since:
    Sep 2003

    Posted 12 Aug 2014 Link to this post

    Hi Ianko,

    Your screen cast actually shows the issue with pasting into IE11.

    If you look at the html, you can see all the retained styles in IE vs the styles from the editor in FF and Chrome.

    When pasting from the word doc, it should carry across all the H1, H2, etc... which it does in FF, but in IE it also has some additional colours, tags, etc...

    Even looking at the first line in FF it is (as expected and correct):
    <h1><span>Heading 1</span></h1>

    In IE11 it is (wrong):
    <h1><span style="color: #365f91; font-family: Cambria; font-size: 24px;">Heading 1</span></h1>

    this sort of MS Word html continues for all other headings, list items, table cells, etc. Please pay attention to comparing the HTML view in FF and IE. its very easy to see.

    Thanks,

    Leon
  9. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 14 Aug 2014 Link to this post

    Hello Leon,

    It appears that I did not understand you correctly.

    When pasting from Word, without the strip options provided in the RadEditor, addition invalid XML content is pasted along with the Word content. I was left with the impression that such content concerns you.

    The described stylization fetched in IE but not in FF and Chrome is not an inconsistent issue of the RadEditor control.

    Let me provide some details about how the RadEditor control controls the MS Word content pasted. Natively the copy/paste functionality is a desktop matter that cannot be entirely controlled client-side (on RadEditor end). When it comes to Word content paste in abn editable HTML element, the browser takes control over the content and translates it from the XML specified by Micorosft to a valid HTML content.

    To test the native pasting from Word behavior of the browser, you can use a simple editable DIV element and paste MS Word content inside it.

    Example: Editable DIV:
    <div contenteditable="true" style="width:500px; height:300px; border:2px solid red;"> </div>

    Investigating the content pasted you will see many XML tags transferred from Word to the HTML content, These invalid content causes many issues in web application and the W3C validation of the generated content.

    Here comes the RadEditor control. With the power of the StripFormattingOptions, the editor is able to remove/strip all the XML content that may cause inconsistent behavior in browsers. But as you can see, with the default ConvertWordLists and MSWordNoMargins options enabled, the styles are not being removed somehow from the content.

    If you have tested to use Word content with sections in the editable div under IE and Firefox, you should already seen that the same stylization issue appears even without the RadEditor as editable element. Also, you can examine the results on my end with this screencast.

    This is because IE has the power to understand properly the MS Word content and more correctly to translate the content to HTML. The Sections elements in Word are not styles with inline stylization approach, but trough style options in a predefined repository, that for some reason is not available for Firefox and Chrome.

    I am sorry to disappoint you, but when it comes to MS Word, IE and cross browser technology there are still some inconstant matters that cannot be properly handled through the control functionality., bceause they stem from the browsers.

    What I can suggest, is to enable additionally the  MSWordNoFonts option (e.g, StripFormattingOptions="MSWordNoMargins, ConvertWordLists") to strip the css styles added in IE, although you should note, that with this option enabled, the font name will be not respected when pasting.

    Regards,
    Ianko
    Telerik
     

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017