|
Article relates to
|
RadEditor for ASP.NET AJAX
Telerik.Web.UI
|
|
Created by
|
Rumen Zhekov
|
HOW-TO
Stripping inline styles when using the
Paste from Word or
Paste from Word strip Font buttons
DESCRIPTION
The
Paste from Word icon is using the
MSWord setting of the
StripFormattingOptions property and the
Paste from Word strip Font icon is using the
MSWordRemoveAll one. Both paste options strip only the Word formatting (mso- attributes and classes, <o:p> tags and other)
without cleaning the inline styles. This means that the paragraph margins and other inline style settings will be untouched and this could spoil the appearance of the pasted content when it is displayed on the public site.
SOLUTION
To strip the inline styles when pasting content through the
Paste From Word or
Paste From Word strip Font use the following code that will fire the
FormatStripper tool with a value of
CSS, e.g.
More information about the different Paste from Word features of RadEditor is available in this live example:
Cleaning Word Formatting.
Please
Sign In
to rate this article.