angular-froala icon indicating copy to clipboard operation
angular-froala copied to clipboard

call the Froala.initialized event with proper context

Open mephju opened this issue 6 years ago • 3 comments

mephju avatar Jul 29 '19 09:07 mephju

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);

mephju avatar Jul 29 '19 09:07 mephju

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

Chreekar avatar Jan 07 '20 15:01 Chreekar

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

dadigu avatar Jun 15 '21 11:06 dadigu