First time here? Check out the FAQ!
I need to know how to make a event listener for CKEditor so that when I paste in content it strips out any images. I found this code on the web but don't know how to hook up the editor to this js function
<script type="text/javascript">
CKEDITOR.on('instanceReady', function (ev) {
ev.editor.on('paste', function (ev) {
ev.data.html = ev.data.html.replace(/<img( [^>]*)?>/gi, '');
});
});
</script>
Thanks
Asked: 2013-08-02 18:16:55 +0800
Seen: 12 times
Last updated: Aug 04 '13