Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call the Froala.initialized event with proper context #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mephju
Copy link

@mephju mephju commented Jul 29, 2019

No description provided.

@mephju
Copy link
Author

mephju commented Jul 29, 2019

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
Copy link

Chreekar commented Jan 7, 2020

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

@dadigu
Copy link

dadigu commented Jun 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants