-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added options ngDisableOnChange, ngDisableOnKeyUp and ngDisableOnBlur… #68
base: master
Are you sure you want to change the base?
Conversation
… to control how changes in ckeditor is digested by angularjs.
Made the release 0.2.2 to my fork, because we need this now and changed to use our fork, but will gladly come back if there is way to control that in ng-ckeditor. Doesn't need to be like I did, but functionality wise it should at least what this offers. |
You could also debounce the setModelData function with a reasonable delay, such that is not fired as often and typically not when people are writing. This has the added benefit, that the event will eventually fire, such that you will not have to wait for a blur event to update the model (if, for example you have other view components dependent on the model state, such as a Submit button which is only enabled when there is content). I have fixed our performance issues by this little change. |
Well delay is kind of bad in my case, as one can edit the text and press save directly and if angular haven't digested the edited text then save will send the old one. I'm using that Valvefi@bd1e2c0 element.bind and still can sometimes fail, especially if browser seems to be on the slow side, but editing the text is nice. Played with debounce, something like the documentation says "ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"", but the default action was still too slow for the users.. Can't remember did I try that only with blur and how would have that worked. But now I'm pretty happy with that. If someone can do it better and get that merged to ng-ckeditor, or have done better ng-ckeditor, happy to drop my fork and use it :) |
Removed model value changing.
…, do not change it to empty string.
If initial model value is null and current view value is empty string…
… to control how changes in ckeditor is digested by angularjs.
We are having many ckeditors in one page and the data is pretty big. AngularJS digesting every key press makes the page really annoying and slow to edit. This change would allow controlling how the changes in ckeditor is digested by angularjs and helping to make our page usage smoother.