Unexpected behaviour when pasting the paragraph in IE

2 posts, 0 answers
  1. Roman
    Roman avatar
    3 posts
    Member since:
    Oct 2011

    Posted 28 Oct 2011 Link to this post

    Steps to reproduce:
    1) Open IE.
    2) Open the RadEditor in the Design View.
    3) Set "New Lines as" to "Paragraphs"
    4) Type "Test", press Enter.
    5) Type "Word. Sentence.". Set "Word." as bold.
    6) Select the "Test "(with extra space)(when selecting with mouse, extra space is selected by defoult). Copy it.
    7) Set the cursor before the "W" character.
    8) Paste copied value.
    9) Change the view to "HTML".
    10) Change the view to "Design".

    You wiil have the next:

    Test

    Test

    Word. Sentence.

    Sentence.

    When expected:

    Test

    Test

    Word. Sentence.


    Note: It was tested on IE 8.

    Could you please provide any solution or workaround?
  2. Rumen
    Admin
    Rumen avatar
    14366 posts

    Posted 31 Oct 2011 Link to this post

    Hello Roman,

    Thank you for reporting this scenario.

    The problem is due to that when the first word Test is selected with a space after it the whole paragraph is copied to the clipboard. After that when the cursor is placed before the W letter the selection is placed inside the <strong> tag in which the word Word resides and after the paste the copied in the clopboard paragraph is pasted in the strong tag, which produces invalid and non well formed HTML content, which misleads the ConvertToXhtml filter of RadEditor.

    You can see the above explanation in the following video:
    http://screencast.com/t/H4rrbKugZ8

    I logged the problem for fixing in our bug tracking system. Here you can find the PITS Issue: Public URL.

    Currently you can avoid the issue by stripping the formatting when pasting content in RadEditor:
    StripFormattingOptions="All"
    OR by disabling the ConvertToXhtml filter.



    Regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top