I thought you have to do something in admin side.
But, now i understand what is your needs.
You have to use initialized Editor instance on front end.
Now, I have updated the code to use. (in Plugin Version 1.0.6)
Now, you can use window.wpcm.editors
object array on front end.
I also have added 2 events listener, triggered at the time of editor initialization.
1. wpcm_editor_loaded
is triggered (with editor
object) after an editor instance is pushed in the window.wpcm.editors
object array.
2. wpcm_editors_loaded
is triggered after all editor instance is pushed in the window.wpcm.editors
object array.
You can use any event to initialize your code…
For Example
( function( $ ) {
$(document.body).on('wpcm_editor_loaded', function (e, editor) {
console.log('current editor', editor);
// your code.
});
$(document.body).on('wpcm_editors_loaded', function (e) {
console.log('all editors', window.wpcm.editors);
// your code.
});
} )( jQuery );