11 Answers, 1 is accepted
0
Hi Christian,
RadEditor strips only MS Word specific tags, classes and attributes in the pasted content. It does not strip the valid inline style attributes. If you would like you can strip the inline styles along with the Word tags and formatting on paste by setting the StripFormattingOptions property to "MSWord,Css", e.g.
<telerik:radeditor runat="server" ID="RadEditor1" StripFormattingOptions="MSWord,Css"></telerik:radeditor>
You can find more information about this property in the following help article: Cleaning Word Formatting.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
RadEditor strips only MS Word specific tags, classes and attributes in the pasted content. It does not strip the valid inline style attributes. If you would like you can strip the inline styles along with the Word tags and formatting on paste by setting the StripFormattingOptions property to "MSWord,Css", e.g.
<telerik:radeditor runat="server" ID="RadEditor1" StripFormattingOptions="MSWord,Css"></telerik:radeditor>
You can find more information about this property in the following help article: Cleaning Word Formatting.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Amey
Top achievements
Rank 1
answered on 18 Jun 2009, 08:53 PM
Thank you Rumen.
However, in Firefox, I see the following in the source just above the beginning of the content. How can we preven this?
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="Word.Document" name="ProgId" />
<meta content="Microsoft Word 11" name="Generator" />
<meta content="Microsoft Word 11" name="Originator" />
<link rel="File-List" /><!--[if gte mso 9]><xml> Normal 0 false false false MicrosoftInternetExplorer4 </xml><![endif]--><!--[if gte mso 9]><xml> </xml><![endif]--><!--[if !mso]><object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object> <style> st1\:*{behavior:url(#ieooui) } </style> <![endif]-->
<style>
<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->
</style>
<!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->
0
Hi,
We have made a number of improvements in the current RadControls for ASP.NET AJAX release regarding the paste from MS Word in Firefox. Please get the 2009.1.527 version and update your project. The extra <meta> and <style> tags will be removed.
Greetings,
Lini
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
We have made a number of improvements in the current RadControls for ASP.NET AJAX release regarding the paste from MS Word in Firefox. Please get the 2009.1.527 version and update your project. The extra <meta> and <style> tags will be removed.
Greetings,
Lini
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Amey
Top achievements
Rank 1
answered on 30 Jul 2009, 07:52 PM
Hi - so we now have the latest version of the Rad Editor 2009.2.701.35
In FF both Paste From Word and just using Control-V make our <p> tags look good with no margins.
In IE, if you use Control-V the <p> tags paster properly with no margins.
However, in IE, if you use the Paste From Word Icon, our <p> tags gets paster with <P style="MARGIN: 0in 0in 0pt">.
We have StripFormattingOptions="MSWordRemoveAll, Css, Font, Span" does this not apply to the Paste From Word button? If not, how do we fix.
0

Amey
Top achievements
Rank 1
answered on 03 Aug 2009, 03:06 PM
Hi - can someone please respond to this?
0
Hi Christian,
Please note that Paste from Word icon is in fact using the setting MSWord, which is not equivalent to MSWordRemoveAll.
When using the editor tools (icons), to get the same result as MSWordRemoveAll you should use the
Paste from Word, strip font tool.
More information about these settings and what they do can be found here:
http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
Kind regards,
Tervel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please note that Paste from Word icon is in fact using the setting MSWord, which is not equivalent to MSWordRemoveAll.
When using the editor tools (icons), to get the same result as MSWordRemoveAll you should use the
Paste from Word, strip font tool.
More information about these settings and what they do can be found here:
http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
Kind regards,
Tervel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Amey
Top achievements
Rank 1
answered on 05 Aug 2009, 02:06 PM
In IE - we are using the Paste from Word strip font button - and we still get all our <p> tags pasted as <p style="margin: 0in 0in 0pt;">.
The same thing happens in your example editor. How to we get the inline styles removed from Paster for Word, strip font (or the other Paste from Word)??
0

Amey
Top achievements
Rank 1
answered on 05 Aug 2009, 02:10 PM
I also noticed that in the html view all the html is in one continuous wrap instead of formatted with carriage returns, this makes it very hard to read - anything we can do about that?
0

Amey
Top achievements
Rank 1
answered on 07 Aug 2009, 02:49 PM
hello - any further thoughts on this - it's and urgent issue for us.
0
Hi Christian,
The Paste From Word button fires the MSWord setting which strips only the MS Word formatting, MS tags and MS attributes. The MSWord setting does not strip the valid inline HTML style attributes such as style="margin: 0in 0in 0pt;".
To strip the inline styles when pasting content through the Paste From Word or Paste From Word Clean Font and Size buttons you should use the following code that will fire the FormatStripper command, e.g.
As to the missing carriage returns problem: I was unable to reproduce it. For your convenience I have attached my test project. If you are able to reproduce the issue, please open a support ticket and send a sample video or screenshot of the problem and sample word document for test.
All the best,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The Paste From Word button fires the MSWord setting which strips only the MS Word formatting, MS tags and MS attributes. The MSWord setting does not strip the valid inline HTML style attributes such as style="margin: 0in 0in 0pt;".
To strip the inline styles when pasting content through the Paste From Word or Paste From Word Clean Font and Size buttons you should use the following code that will fire the FormatStripper command, e.g.
<script type="text/javascript"> |
function OnClientCommandExecuted(editor, args) |
{ |
if (!args || !args.get_commandName) return; |
//The command name |
var commandName = args.get_commandName(); |
|
var value = args.get_value(); |
if(commandName=="PasteFromWord" || commandName == "PasteFromWordNoFontsNoSizes") |
{ |
editor.fire("FormatStripper", {value : "CSS"}); |
} |
} |
</script> |
<telerik:radeditor runat="server" ID="RadEditor1" |
OnClientCommandExecuted="OnClientCommandExecuted"> |
</telerik:radeditor> |
As to the missing carriage returns problem: I was unable to reproduce it. For your convenience I have attached my test project. If you are able to reproduce the issue, please open a support ticket and send a sample video or screenshot of the problem and sample word document for test.
All the best,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Amey
Top achievements
Rank 1
answered on 10 Aug 2009, 07:16 PM
Hi Rumik,
This solved the issue.
Thanks!
This solved the issue.
Thanks!