froala / angular-froala

Angular.js bindings for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
MIT License
306 stars 123 forks source link

call the Froala.initialized event with proper context #214

Open mephju opened 5 years ago

mephju commented 5 years ago

According to https://www.froala.com/wysiwyg-editor/docs/events#initialized the event's context should be the editor itself.

Therefore I added this line of code that will properly provide the context to the event consumer: var initEvent = ctrl.options.events.initialized.bind(ctrl.froalaEditor);

Chreekar commented 4 years ago

It would be easier to just change line 114 in the original code from: initEvent && initEvent(); to initEvent && initEvent.bind(this)();

dadigu commented 3 years ago

Could this be merged in please? This solves a huge pain I have to be able to get the editor on the initializedevent in order to enable/disable the editor on render in angularjs