Text loaded dynamically is undoable
See original GitHub issueIt may be by design, but either a good workaround or new API call needed. Our app is dynamic, loading data from server.
We use such format
$('.summernote').summernote();
$.get('/api/call', {},
function(response){
$('#text').summernote('code', response.text);
}
);
The text loads well and editor works well. But if user does UNDO, editor undo’s code insertion and leaves editor blank.
Is there a better way to insert a text and prevent it disappear from editor on first undo?
There was a similar issue reported in angular-summernote, but nothing about standard summernote: https://github.com/summernote/angular-summernote/issues/110
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Ace Editor Load new content Dynamically Clear old content ...
If you want to completely discard old content, and clear undo history use editor.session.setValue(text). If you want to keep old content to ...
Read more >How to make Chrome "Find on page" find dynamically loaded ...
Press Ctrl+F; After the text has been dynamically changed, Press 'Esc' and then press 'Ctrl+F' again; Press 'Enter'.
Read more >1. Loading and Execution - High Performance JavaScript [Book]
You can dynamically load as many JavaScript files as necessary on a page, but make sure you consider the order in which files...
Read more >Javascript: Increasing performance using Dynamic Loading
The theory was that it's best to load them first so that the page will come in looking and behaving correctly. For Example...
Read more >Dynamically loading JavaScript from within Sandbox
Unfortunately, as Wictor pointed out in his article, the abstraction layer of Sandboxed Solutions in SharePoint 2010 makes it impossible for you ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No solution yet. It still causes problems for us.
#2648 has merged. This problem could be fixed by calling
commit
after setting the content. Please stay tuned till the next release.