@@ -69,14 +69,12 @@ angular.module('ui.tinymce', [])
69
69
}
70
70
} ) ;
71
71
72
- // Update model on button click
73
- ed . on ( 'ExecCommand' , function ( ) {
74
- ed . save ( ) ;
75
- updateView ( ed ) ;
76
- } ) ;
77
-
78
- // Update model on change
79
- ed . on ( 'change NodeChange' , function ( ) {
72
+ // Update model when:
73
+ // - a button has been clicked [ExecCommand]
74
+ // - the editor content has been modified [change]
75
+ // - the node has changed [NodeChange]
76
+ // - an object has been resized (table, image) [ObjectResized]
77
+ ed . on ( 'ExecCommand change NodeChange ObjectResized' , function ( ) {
80
78
ed . save ( ) ;
81
79
updateView ( ed ) ;
82
80
} ) ;
@@ -87,12 +85,6 @@ angular.module('ui.tinymce', [])
87
85
scope . $digest ( ) ;
88
86
} ) ;
89
87
90
- // Update model when an object has been resized (table, image)
91
- ed . on ( 'ObjectResized' , function ( ) {
92
- ed . save ( ) ;
93
- updateView ( ed ) ;
94
- } ) ;
95
-
96
88
ed . on ( 'remove' , function ( ) {
97
89
element . remove ( ) ;
98
90
} ) ;
@@ -114,7 +106,7 @@ angular.module('ui.tinymce', [])
114
106
// re-rendering directive
115
107
$timeout ( function ( ) {
116
108
if ( options . baseURL ) {
117
- tinymce . baseURL = options . baseURL ;
109
+ tinymce . baseURL = options . baseURL ;
118
110
}
119
111
tinymce . init ( options ) ;
120
112
toggleDisable ( scope . $eval ( attrs . ngDisabled ) ) ;
0 commit comments