Skip to content

Commit d12af1b

Browse files
committed
fixed: 3049
1 parent 5ab846e commit d12af1b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/angular-froala.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,10 @@
117117
ngModel.$render()
118118
}
119119
//https://github.com/froala-labs/froala-editor-js-2/issues/3049
120-
let elementOptions = {}
121-
Object.keys(ctrl.options).forEach(key => {
122-
if (key !== "froalaEditor") {
123-
elementOptions[key] = ctrl.options[key];
124-
}
125-
});
126-
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options = elementOptions);
120+
if (ctrl.options.froalaEditor) {
121+
delete ctrl.options.froalaEditor;
122+
}
123+
ctrl.froalaEditor = new FroalaEditor(element[0], ctrl.options);
127124

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

0 commit comments

Comments
 (0)