question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text loaded dynamically is undoable

See original GitHub issue

It 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ipa1981commented, Oct 6, 2017

No solution yet. It still causes problems for us.

0reactions
lqezcommented, Oct 1, 2018

#2648 has merged. This problem could be fixed by calling commit after setting the content. Please stay tuned till the next release.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found