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

Copy List from Word to RadEditor 2008 Q2

1 Answer 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Johan
Top achievements
Rank 1
Johan asked on 09 Nov 2011, 11:37 AM
Hi

I have been trying to copy a list from Word that is not formatted with the style normal. When i paste it into RadEditor i get strange formatting on my list. For example: I can make a paragraph style in Word called ListParapraph. I then make a new listformat that uses the ListParagraph style for the text. When i try to copy that list to RadEditor 2008 Q2 it makes the list like stairs and it adds a lot of empty space below the list.
Here is the HTML-code that i get.
<p style="margin: 0cm 0cm 10pt 36pt" class="TestParagraph2"><span style="font-family: symbol"><span style="font-size: 24px">·</span><span style="font: 7pt 'times new roman'">        </span><span style="font-size: 24px">Sdfsdfsdfs</span>
<p style="margin: 0cm 0cm 10pt 36pt" class="TestParagraph2"><span style="font-family: symbol"><span style="font-size: 24px">·</span><span style="font: 7pt 'times new roman'">        </span><span style="font-size: 24px">Dfsdfsdfs</span>
<p style="margin: 0cm 0cm 10pt 36pt" class="TestParagraph2"><span style="font-family: symbol"><span style="font-size: 24px">·</span><span style="font: 7pt 'times new roman'">        </span><span style="font-size: 24px">Dfsdfsdfs</span>
<p style="margin: 0cm 0cm 10pt 36pt" class="TestParagraph2"><span style="font-family: symbol"><span style="font-size: 24px">·</span><span style="font: 7pt 'times new roman'">        </span><span style="font-size: 24px">Fsdfsdf</span>
<p style="margin: 0cm 0cm 10pt 36pt" class="TestParagraph2"><span style="font-family: symbol"><span style="font-size: 24px">·</span><span style="font: 7pt 'times new roman'">        </span><span style="font-size: 24px">sdfsdfsdfsdfs</span></span></p>
</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</span></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>

Its not closing the <p> tags after each line so the list becomes very strange (like stairs). I noticed that the behavior is changed in newer versions of RadEditor but is that the only way to fix the problem?


1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Nov 2011, 02:31 AM
Hello Johan,

The lists created in MS Word are pasted as span tags by the clipboard in RadEditor, but not as valid UL / OL and LI tags. This unwanted behavior is handled by the new StripFormattingOptions="ConvertWordLists" filter which is offered only by the newest builds of the control.

The code is tightly integrated in the source and cannot be used by the older versions.

All the best,
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
Johan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or