Upload the editor.js file containing:
window.$xa(document).ready(function () { $('[contenteditable]').on('paste', function(e) { e.preventDefault(); var text = ''; if (e.clipboardData || e.originalEvent.clipboardData) { text = (e.originalEvent || e).clipboardData.getData('text/plain'); } else if (window.clipboardData) { text = window.clipboardData.getData('Text'); } if (document.queryCommandSupported('insertText')) { document.execCommand('insertText', false, text); } else { document.execCommand('paste', false, text); } }); });
Then add My Editing Theme to the Editing Theme of your site:
Now you can do paste from word without keeping the content. Happy content editors, happy developers!
Cheers, Luuk
No comments:
Post a Comment