4 Answers, 1 is accepted
0
Zen
Top achievements
Rank 1
answered on 18 Nov 2015, 02:31 PM
I mean to say Kendo UI Editor. So the question should be:
Is there a way to do clean formatting when pasting the content of the clipboard (not from MS Word document) into the Kendo UI Editor?
Basically, I want to accomplish the same thing as the clean formatting tool does.
Thanks!
Zen
0
Hi Zen,
Customizations on the pasted content can be performed in the paste event of the Editor.
http://docs.telerik.com/kendo-ui/api/javascript/ui/editor#events-paste
You can either use string manipulation, or temporarily inject the pasted content in an invisible container and clean the formatting via DOM manipulation.
Regards,
Dimo
Telerik
Customizations on the pasted content can be performed in the paste event of the Editor.
http://docs.telerik.com/kendo-ui/api/javascript/ui/editor#events-paste
You can either use string manipulation, or temporarily inject the pasted content in an invisible container and clean the formatting via DOM manipulation.
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Zen
Top achievements
Rank 1
answered on 23 Nov 2015, 03:09 PM
Dimo, thank you very much for your prompt reply.
Is there a way though, to use the code behind the Clean Formatting tool, to clean the pasted content?
Thanks!
Zen
0
Hello Zen,
The "Clean formatting" tool works with the currently selected content in the Editor. From this point of view, the tool can be used for the pasted content only if the user selects what he have already pasted and clean it manually.
Regards,
Dimo
Telerik
The "Clean formatting" tool works with the currently selected content in the Editor. From this point of view, the tool can be used for the pasted content only if the user selects what he have already pasted and clean it manually.
Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!