Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 9bc75a6

Browse files
When using the same tinymce editor for different rows of content (i.e. open row 1 to populate editor, close row 1, then open row 2 to populate the same editor), there is an issue where if you hit 'undo' while in row 2, it will start going back to the content from row 1. I would recommend adding in a line that will refresh the undoManager when the content is re-set.
1 parent fab1678 commit 9bc75a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tinymce.js

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ angular.module('ui.tinymce', [])
168168
tinyInstance.getDoc()
169169
) {
170170
tinyInstance.setContent(viewValue);
171+
tinyInstance.undoManager.clear();
171172
// Triggering change event due to TinyMCE not firing event &
172173
// becoming out of sync for change callbacks
173174
tinyInstance.fire('change');

0 commit comments

Comments
 (0)