Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 00cc466

Browse files
committed
Merge pull request #39 from rvdkooy/master
Prevent the view to be updated when the the setContent is called during init
2 parents cff9ae2 + f4ffc38 commit 00cc466

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tinymce.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ angular.module('ui.tinymce', [])
4545
});
4646
// Update model on change, i.e. copy/pasted text, plugins altering content
4747
ed.on('SetContent', function (e) {
48-
ed.save();
49-
updateView();
48+
if(!e.initial){
49+
ed.save();
50+
updateView();
51+
}
5052
});
5153
if (expression.setup) {
5254
scope.$eval(expression.setup);

0 commit comments

Comments
 (0)