Seth
Seth

Reputation: 2796

CKEditor on('paste') event doesn't have evt.data.html defined

I refactored my CKEditor code today, and now find the paste event is only giving me plain-text, no HTML (required for my application). I can't figure out what changed (and its changed on chrome, firefox, and ie), any ideas what causes CKEditor to paste text instead of html? The copied element (from the same web page) is definitely putting HTML in the clipboard.

CKEditor.on('paste', function(evt) {
   // evt.data.html == undefined
   // evt.data.text == "..."
}

Upvotes: 0

Views: 1011

Answers (1)

Perttu
Perttu

Reputation: 171

Make sure that your config does not have CKEDITOR.config.forcePasteAsPlainText= true; as that effectively removes evt.data.html property leaving you only with evt.data.text to work with.

Upvotes: 1

Related Questions