Insert String into caret position API
Opened this issue · 1 comments
ado2000 commented
It could be same to the paste behaviour.
This is the javascript code of wysiwyg-e
if (!this._pasteHandler) { this._pasteHandler = function (event) { event.preventDefault(); var data = event.clipboardData.getData('text/html'); // If paste does not contain HTML, fall back to plain text if (!data.length) data = event.clipboardData.getData('text'); document.execCommand('insertHTML', false, data); }.bind(this); }
May be we can copy the text/html value into the clipboard , then call the paste function.
or call the document.execCommand('insertHTML', false, data); function directly