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

Using pasteCleanup custom and standard options

2 Answers 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Wes
Top achievements
Rank 1
Wes asked on 12 Apr 2017, 03:27 PM

I'm in a situation where I need to use a custom function to scrape pasted clipboard data for raw image data and replace that with custom markup, but also need to support standard options like msTags and msAllFormatting. My thinking is that I'll need to write code into my custom function which manually calls the Kendo Editor methods that run the pasteCleanup option handlers. Is this right?

Has anyone done this before? There doesn't appear to be any native option to do what I'm talking about.

2 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 17 Apr 2017, 06:01 AM
Hello Wes,

On the following Dojo, you will find a very simple implementation of a custom pasteCleanup function, that would replace any pasted <img /> content to the editor with and <h1> element. Note, that the msTagsand the msAllFormatting options are also enabled.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Wes
Top achievements
Rank 1
answered on 17 Apr 2017, 12:53 PM
Thanks, Veselin. Through some of my own experimentation, I also found this solution. Good to see your verification I was on the right track.
Tags
Editor
Asked by
Wes
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Wes
Top achievements
Rank 1
Share this question
or