I'm using EE 2.5.2 and Wygwam 2.6.3. I need to bind some custom javascript to a Wygwam field on the publish/edit screen in the CP once the field has initialised.

Specifically, I need to bind to something like this:


However as the iframe is created dynamically, I need to wait until after Wygwam has initialised for $(#cke_field_id_12) to have a child iframe plus contents for me to bind to.

Does CKEditor/Wygwam fire an event when it's ready that I can hook into to bind my functionality to? Or is the an alternative way to do this that I haven't thought of?

1 Answer 1


CKEditor’s instanceReady event ought to fit the bill for you:


CKEDITOR.on('instanceReady', function(ev) {
    // ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.