Hello,
we have a limitation that requires us to use the ContentAreaMode="DIV" on our project.
The issue we have is that, at the moment, we would like to strip word formatting.
What we did until now is to strip manually tags on server side, as we could not make the StripFormattingOnPaste work in this mode.
As our users saw recently the demo on the site, they would like to have it done client side. Our issue is show here:
With this code, removing ContentAreaMode does make the Stripping work
Is there any workaround ?
Best regards
Philippe
we have a limitation that requires us to use the ContentAreaMode="DIV" on our project.
The issue we have is that, at the moment, we would like to strip word formatting.
What we did until now is to strip manually tags on server side, as we could not make the StripFormattingOnPaste work in this mode.
As our users saw recently the demo on the site, they would like to have it done client side. Our issue is show here:
<
telerik:RadEditor
runat
=
"server"
StripFormattingOnPaste
=
"All"
ContentAreaMode
=
"DIV"
ID
=
"RadEditor1"
>
<
Content
>
</
Content
>
</
telerik:RadEditor
>
Is there any workaround ?
Best regards
Philippe
5 Answers, 1 is accepted
0
Accepted
Hello Philippe,
The problem is logged for fixing in our PITS system. The temporary workaround is to strip the formatting when submitting the content using the code below:
Best regards,
Rumen
the Telerik team
The problem is logged for fixing in our PITS system. The temporary workaround is to strip the formatting when submitting the content using the code below:
<script type=
"text/javascript"
>
function
OnClientLoad(editor, args){
editor.fire(
"SelectAll"
);
editor.fire(
"FormatStripper"
, { value:
"WORD"
});
//strips the MS Word formatting
}
</script>
<telerik:RadEditor runat=
"server"
OnClientLoad=
"OnClientLoad"
StripFormattingOptions=
"All"
ContentAreaMode=
"DIV"
ID=
"RadEditor1"
>
<Content>
</Content>
</telerik:RadEditor>
<asp:Button Text=
"Submit"
ID=
"Submit"
runat=
"server"
/>
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.
0

Phil
Top achievements
Rank 1
answered on 05 Apr 2012, 03:11 PM
Hi,
I came across this issue also. However, I had to change the event from OnClientLoad to OnClientSubmit for this to work.
I did this as found on the demo http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
Cheers
I came across this issue also. However, I had to change the event from OnClientLoad to OnClientSubmit for this to work.
I did this as found on the demo http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx
Cheers
0

skhalidi
Top achievements
Rank 1
answered on 12 Feb 2013, 03:47 AM
I am using RADEditor for the Dotnetnyuke (6.2.6 CE) and have the problem
of Strip Formatting on Paste does not work in the div mode (only the
iFrame default mode). I need the div mode as the iFrame mode does work
well with the RTL skin of my portal, i.e. I can only edit in LTR dir.
The dotnetnuke forums could not help in this issue.
I am aware of the strip on submit that is not possible in my case as I need to have tables and other formatting toolbar buttons.
I am wondering was Telerik able to resolve the issue of StripFormattingOnPaste since this last posting as I could no see any other posting with that regards.
The dotnetnuke forums could not help in this issue.
I am aware of the strip on submit that is not possible in my case as I need to have tables and other formatting toolbar buttons.
I am wondering was Telerik able to resolve the issue of StripFormattingOnPaste since this last posting as I could no see any other posting with that regards.
0
Hello,
The workaround that I would propose is to attach to the onpaste event of the div content area and fire the PasteFromWord command of RadEditor, which will open the Paste from Word dialog. Your users will paste the Word content in it and after clicking the Paste button, the stripped content will be pasted in the editor:
For your convenience I have recorded a video demonstrating my test and the workaround: http://screencast.com/t/kD7eoYak.
Kind regards,
Rumen
the Telerik team
The workaround that I would propose is to attach to the onpaste event of the div content area and fire the PasteFromWord command of RadEditor, which will open the Paste from Word dialog. Your users will paste the Word content in it and after clicking the Paste button, the stripped content will be pasted in the editor:
<telerik:RadEditor ID=
"txtItemSubject"
runat=
"server"
OnClientLoad=
"OnClientLoad"
ContentAreaMode=
"Div"
>
</telerik:RadEditor>
<script type=
"text/javascript"
>
function
OnClientLoad(editor, args) {
editor.attachEventHandler(
"paste"
,
function
(e) {
editor.fire(
"PasteFromWord"
);
$telerik.cancelRawEvent(e);
return
false
;
});
}
</script>
For your convenience I have recorded a video demonstrating my test and the workaround: http://screencast.com/t/kD7eoYak.
Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

skhalidi
Top achievements
Rank 1
answered on 14 Feb 2013, 04:18 AM
That is great!
Many thanks for the reply, I have made reference to your workaround in the DNN forums.
http://www.dotnetnuke.com/Resources/Forums/forumid/54/threadid/474923/scope/posts/threadpage/2.aspx
http://www.dotnetnuke.com/Resources/Forums/forumid/108/threadid/478601/scope/posts.aspx
Many thanks for the reply, I have made reference to your workaround in the DNN forums.
http://www.dotnetnuke.com/Resources/Forums/forumid/54/threadid/474923/scope/posts/threadpage/2.aspx
http://www.dotnetnuke.com/Resources/Forums/forumid/108/threadid/478601/scope/posts.aspx