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

Clean Word Formatting OnPaste

3 Answers 100 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Timothy
Top achievements
Rank 1
Timothy asked on 09 Nov 2010, 02:48 PM
I am using the RadEditor within SharePoint and wondering if it is possible to conditionally clean word formatting during the on paste event.

I have looked at the StripFormattingOptions, this doesn't seem to produce the same results as pressing ok to the clean word content dialog when pasting content. E.g. If I set StripFormattingOptions to MSWordRemoveAll it still doesn't convert the bullet points to a UL and LI's. Is there any way to do this within the On Paste event?

Thanks in advance,

Tim

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Nov 2010, 05:18 PM
Hi Timothy,

Could you set the StripFormattingOptions property to MSWord?

If the problem still persists, please, provide sample Word content so that we can try to reproduce the bullets issue on our end?

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Timothy
Top achievements
Rank 1
answered on 11 Nov 2010, 11:49 AM
Rumen,

Thanks for the response. Is it possible to use the StripFormattingOptions conditionally within the OnPaste method?


Thanks,

tim
0
Rumen
Telerik team
answered on 16 Nov 2010, 02:47 PM
Hi Tim,

It is not possible because the StripFormattingOptions options are executed before the execution of the OnClientPasteHtml event and the content will be already stripped when obtained through the args.get_value(); method.

<script type="text/javascript">
function OnClientPasteHtml(sender, args) {
var commandName = args.get_commandName();
var value = args.get_value();

alert(value);

}
</script>
<telerik:RadEditor runat="server" OnClientPasteHtml="OnClientPasteHtml" StripFormattingOptions="MSWordRemoveAll"
ID="RadEditor1">
</telerik:RadEditor>


Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jumpstart 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
Timothy
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Timothy
Top achievements
Rank 1
Share this question
or