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

formating content in RAD Editor when pasting from word

2 Answers 70 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Elangovan
Top achievements
Rank 1
Elangovan asked on 18 Nov 2010, 01:56 PM
Hi,
I'm using the RAD Editor as content management tool in ASP.NET. Now I want to remove some unwanted formatting comes from MSWord when copying a Table created in Word. Is there any way to remove the specific attributes or retaining only width or height attributes only. if you have provide some samples.

Regards,
Elangovan P

2 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 18 Nov 2010, 02:34 PM
Hi Elangovan,

To achieve the required functionality you can assign a handler to the OnClientPasteHtml event to examine and modify the pasted content, e.g.:
<telerik:RadEditor ID="RadEditor1" runat="server" OnClientPasteHtml="OnClientPasteHtml">
</telerik:RadEditor>
 
 
<script type="text/javascript">
    function OnClientPasteHtml(editor, args)
    {
        var content = args.get_value();
        //modify content
        args.set_value(content);
    }
</script>

Additional information regarding OnClientPasteHtml event is available in the following help article:
OnClientPasteHtml

Best wishes,
Dobromir
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.
0
Elangovan
Top achievements
Rank 1
answered on 19 Nov 2010, 06:05 AM
Thanks you very much for your inputs... I will try using the OnClientPasteHtml event.


Regards,
Elangovan
Tags
Editor
Asked by
Elangovan
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Elangovan
Top achievements
Rank 1
Share this question
or