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

summernote('destroy') breaks binding #209

Open
sertal70 opened this issue Jun 11, 2019 · 0 comments
Open

summernote('destroy') breaks binding #209

sertal70 opened this issue Jun 11, 2019 · 0 comments

Comments

@sertal70
Copy link

sertal70 commented Jun 11, 2019

Hi, in my application there are situation in which I need to change configuration options for summernote. Since it is not possible to change options after summernote has been initialised (see #153 and #23), I ended up by destroying summernote then rebuilding it with new options:

...
let sn = angular.element(document.getElementById('SN'));
sn.summernote('destroy');
sn.summernote(newOptions);
...

Unfortunately this brakes angular binding in a strange way: if I modify text within summernote the binding variable doesn't get updated but if I update the binding variable (using another component like an input tag, for example) the text inside summernote get updated.

You can have a look at this behavior in the following jsfiddle I made:

https://jsfiddle.net/sertal/790eqytf/113/

Can this be fixed in some way? Thanks

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

1 participant