Listener for CKEditor

asked 2013-08-02 18:16:55 +0800

A100 gravatar image A100

updated 2013-08-04 07:33:30 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8

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, '');


delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-08-02 18:16:55 +0800

Seen: 12 times

Last updated: Aug 04 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More