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

Commit

Permalink
When using the same tinymce editor for different rows of content (i.e…
Browse files Browse the repository at this point in the history
…. 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.
  • Loading branch information
jasonstringify committed Jun 12, 2017
1 parent fab1678 commit 9bc75a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ angular.module('ui.tinymce', [])
tinyInstance.getDoc()
) {
tinyInstance.setContent(viewValue);
tinyInstance.undoManager.clear();
// Triggering change event due to TinyMCE not firing event &
// becoming out of sync for change callbacks
tinyInstance.fire('change');
Expand Down

0 comments on commit 9bc75a6

Please sign in to comment.