ckEditor: Call javascript on load?

Community Driven Extensions Project
Post Reply
strumbles
Posts: 3
Joined: 15 Feb 2013, 09:31

22 Feb 2013, 22:55

I have my

Code: Select all

<pe:ckEditor id="Details" value="#{backingBean.details}"/>
Now I need to call some Javascript code after Primefaces Extensions has finished initializing CKEDITOR. The following doesn't work as CKEDITOR is not defined yet:

Code: Select all

window.onload = function() {
  CKEDITOR.on('instanceReady', function() {
     alert('hello');
  });
}
Please help me! Thanks!

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

23 Feb 2013, 10:54

You can catch the "initialize" event via p:ajax or pe:javascript.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests