Getting the editor instance can be done in JS inside the initialized event like below.
var editor = new FroalaEditor('selector', {
events: {
'initialized': function() {
// Editor instance.
console.log(editor);
// The main editable DOM element.
console.log(editor.el);
// The options used for the current instance.
console.log(editor.opts);
// Editor toolbar object.
console.log(editor.$tb);
}
}
}) (edited)
Getting the editor instance via selector:
$('.seletor')[0]['data-froala.editor']
Quick Tip: Using the editor instance instead of the jQuery way of calling methods is a handy method of easily extending the editor behavior. For example, when storing the selection, you could do editor.selection.save()
instead of $(selector).froalaEditor('selection.save');
.