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

bind correct this context to event #245

Closed dadigu closed 1 year ago

dadigu commented 3 years ago

The angular froala implementation hooks into the initialized event and passes it on. but the editor context is missing.

According to froala documentation you should be able to access the editor instance via this in most events.

new FroalaEditor('.selector', {
  events: {
    'initialized': function () {
      // Do something here.
      // this is the editor instance.
      console.log(this);
    }
  }
});

Right now this is undefined but this PR will fix this issue