Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ckeditor: how to add permanent onclick event?

Petr Dusek
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am looking for a way to make the CKEDITOR wysiwyg content interactive. This means for example adding some onclick events to the specific elements. I can do something like this:

After processing this action it works nice. But consequently if I change the mode to source-mode and then return to wysiwyg-mode, the javascript won't run. The onclick action is still visible in the source-mode, but is not rendered inside the textarea element.

However, it is interesting, that this works fine everytime:

And it is also not rendered inside the textarea element! How is it possible? What is the best way to work with onclick and onmouse events of CKEDITOR content elements?

I tried manually write this by the source-mode:

And the Javascript (onclick action) does not work. Any ideas?

Thanks a lot!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic