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

Can we stop Radeditor pasting comments copied from MS Word?

1 Answer 69 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Troy Clark
Top achievements
Rank 1
Troy Clark asked on 31 Jan 2011, 01:13 AM
Hi All,

Just noticed that when we copy text from an MS Word (2007) document that has comments inserted that they are appearing as footnotes in the Radeditor.  Example of code below:

<P>The <A>transitional provisions in the <em>Act 2009</em> </A><A id=_anchor_1 language=JavaScript>[b1]</A> (PPS Act) are designed to facilitate a seamless changeover.</P>
<DIV>
<HR align=left SIZE=1 width="33%">
  
<DIV>
<DIV id=_com_1 language=JavaScript><A></A>
<P> <A>[b1]</A>In hoverfield: < Chapter 9, <em>Act</em> <em>09</em>.> </P></DIV></DIV></DIV>


We have got the radeditor converting <b> and <i> tags to <strong> and <em> and also have the radeditor stripping span, font and inline CSS styles on paste.

Cheers,

Troy

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Jan 2011, 11:42 AM
Hello Troy,

I noticed that the provided content is valid HTML content and it does not contain MS Word formatting.
When pasting content from Word or MS Office, RadEditor removes only the MS Word formatting (<o:p> tags, mso- attributes, special MS CSS classes), but it does not strip valid HTML tags.

If you would like you can try to implement the requested functionality yourself by examining the pasted content in the OnClientPasteHtml event of RadEditor and stripping the desired part of it using DOM methods and / or regular expressions.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Troy Clark
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or