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

Update Editor content on paste

0 Answers 42 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mk
Top achievements
Rank 1
Mk asked on 12 Sep 2012, 11:33 AM
Hello,

I have an Editor where I have setup with the "paste" event.  I am having no problem with the event firing it is that I can't get it to replace the content correctly.  Here is a working example of the problem http://jsfiddle.net/WgvNr/3/.  To test paste in some Microsoft Word content with some formatting.  The paste event will strip the Word formatting.  This works also, but it leaves the original content and the edited content. How can I just have the edited content show in the editor?
$("#txtActions").kendoEditor({
    tools: [
     "bold",
     "italic",
     "underline",
     "insertUnorderedList",
     "insertOrderedList",
 ],
    paste: function (e) {
        var editor = $("#txtActions").data("kendoEditor");
        editor.value(CleanWordHTML(e.html));
        //console.log(editor);
    }
});

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Mk
Top achievements
Rank 1
Share this question
or