Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/angular-froala.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@
});

ctrl.registerEventsWithCallbacks('initialized', ctrl.options.events && ctrl.options.events.initialized)
var initEvent = ctrl.options.events.initialized;
if (!ctrl.options.events) ctrl.options.events = {};
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options);
var initEvent = ctrl.options.events.initialized.bind(ctrl.froalaEditor);
ctrl.options.events.initialized = function () {
initEvent && initEvent();
ctrl.initListeners();
ctrl.editorInitialized = true;
ngModel.$render()
}
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options);

//assign the froala instance to the options object to make methods available in parent scope
if (scope.froalaOptions) {
Expand Down