Skip to content

Commit

Permalink
add a textOperation method to the editor object for programatically c…
Browse files Browse the repository at this point in the history
…hanging the input box contents
  • Loading branch information
balpha committed Mar 2, 2012
1 parent eb24a60 commit b448100
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Markdown.Editor.js
Expand Up @@ -81,6 +81,11 @@
if (uiManager) // not available on the first call
uiManager.setUndoRedoButtonStates();
}, panels);
this.textOperation = function (f) {
undoManager.setCommandMode();
f();
that.refreshPreview();
}
}

uiManager = new UIManager(idPostfix, panels, undoManager, previewManager, commandManager, help);
Expand Down

0 comments on commit b448100

Please sign in to comment.