New to Kendo UI for jQueryStart a free 30-day trial

PasteCleanup

configuration

Options for controlling how the pasting content is modified before it is added in the editor.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        all: false,
        css: false,
        custom: null,
        keepNewLines: false,
        msAllFormatting: false,
        msConvertLists: true,
        msTags: true,
        none: false,
        span: false
    }
});
</script>

All HTML tags are stripped leaving only the text in the content.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        all: true
    }
});
</script>

Remove style and class attributes from the pasting content.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        css: true
    }
});
</script>

Use a callback function to integrate a custom implementation for cleaning up the paste content. Make sure the callback function always returns the result.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        custom: function(html) {
            return html.replace(/<img[^>]*>/, "");
        }
    }
});
</script>

Strip all HTML tags but keep new lines in the pasted content.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        keepNewLines: true
    }
});
</script>

Remove all special formatting from MS Word content like font-name, font-size and MS Word specific tags.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        msAllFormatting: true
    }
});
</script>

Converts MS Word pasted content into HTML lists.

Default: true

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        msConvertLists: false
    }
});
</script>

Removes all MS Word specific tags and cleans up the extra metadata.

Default: true

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        msTags: false
    }
});
</script>

Prevent any cleaning up of the content.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        none: true
    }
});
</script>

Remove all span elements from the content, ensuring much of the inline formatting is removed.

Default: false

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    pasteCleanup: {
        span: false
    }
});
</script>