There was an error while loading. Please reload this page.
2 parents 6e40e8b + 882fca3 commit abd32d1Copy full SHA for abd32d1
src/angular-froala.js
@@ -116,6 +116,10 @@
116
ctrl.editorInitialized = true;
117
ngModel.$render()
118
}
119
+ //https://github.com/froala-labs/froala-editor-js-2/issues/3049
120
+ if (ctrl.options.froalaEditor) {
121
+ delete ctrl.options.froalaEditor;
122
+ }
123
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options);
124
125
//assign the froala instance to the options object to make methods available in parent scope
@@ -142,11 +146,12 @@
142
146
143
147
144
148
149
+ if (!element) {
150
+ return;
151
145
152
element.bind('$destroy', function() {
- if (element) {
153
ctrl.froalaEditor.destroy();
154
element = null;
- }
155
});
156
};
157
0 commit comments