I have 4 ckeditor instances on one page and I want to set a style on the last one (justifybloc).
for now I use this code :
CKEDITOR.on('instanceReady', function(evt) {
if (evt.editor.name != undefined) {
if (evt.editor.name.indexOf('edit-field-body-1') > -1) {
evt.editor.execCommand( 'justifyblock' );
}
}
});
execCommand focus my textarea and i don't want.
I don't know other method to do this.
Thank you.
I solved my problem with this solution
Code pen exemple