Open shyamal890 opened 8 years ago
I am not sure we are set up to work with ng-model-options. I am open to supporting this if you want to put out a PR.
I will open a ticket and look into adding a version number to the tinymce.js file.
@deeg I have no idea how this can be supported. however, there is something that I noticed, changes in debounce
value are taken in to consideration where as blur
is not.
@deeg Made some changes to js file for custom debounce and blur option. Would like your take whether they are good enough as a temporary solution?
Changes:
Added debouncetime
and onblur
to options.
//Debounce update and save action
var debouncedUpdate = (function(debouncedUpdateDelay) {
var debouncedUpdateTimer;
return function(ed) {
$timeout.cancel(debouncedUpdateTimer);
debouncedUpdateTimer = $timeout(function() {
return (function(ed) {
if (ed.isDirty()) {
ed.save();
updateView(ed);
}
})(ed);
}, options.debouncetime); //CHANGED
};
})(400);
ed.on('blur', function() {
element[0].blur();
ngModel.$setTouched();
if (!$rootScope.$$phase) {
scope.$digest();
}
if(options.onblur){
updateView(ed); //CHANGED
}
});
Is this issue fixed or still opened?
For some reason when I utilize
ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 5000, 'blur': 0 } }"
.Default
delay of 5000 is working alright. However,onBlur
doesn't trigger model update.Example Plunker
Request: Please add version number in the
tinymce.js
file.