Skip to content
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

ngModel not updating when in code view #139

Open
EventectiveNButler opened this issue Jan 6, 2022 · 1 comment
Open

ngModel not updating when in code view #139

EventectiveNButler opened this issue Jan 6, 2022 · 1 comment

Comments

@EventectiveNButler
Copy link

I have some users who do not change back from code view to the wysiwyg view before sending/saving. It appears ngModel updates in the wysiwyg editor with every user input but in the code editor the changes are held till the view is changed back to the wysiwyg editor. This is causing changes to the model to be missed if the user does not swap back to the wysiwyg editor.

Probably want to add a hook to onChangeCodeview to your initListeners function:
this._$element.on('summernote.onChangeCodeview', function(
event,
contents,
$editable
) {
setTimeout(function() {
self.updateModel(contents);
}, 0);
});

this would also be fine as a config option like immediateAngularModelUpdate

@Makaveli1902
Copy link

Any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants