This is a migrated thread and some comments may be shown as answers.

Unexpected behaviour when pasting the paragraph in IE

1 Answer 88 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 28 Oct 2011, 03:36 PM
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?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Oct 2011, 10:25 AM
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
Tags
Editor
Asked by
Roman
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or