I cannot find out how to select element inside CKEditor by class using jQuery selector, so any help is appreciated.
CKEDITOR.instances.editor1.window.getFrame().$
retrieves a native DOM element for editor editable area. So:
$( CKEDITOR.instances.editor1.window.getFrame().$ ).contents().find( anything );
Should solve your problem.
Also note that CKEditor provides an API for DOM manipulation:
CKEDITOR.instances.editor1.document.getById( 'someId' );
CKEDITOR.instances.editor1.document.getElementsByTag( 'div' );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With