I would like to reset all the contents of the Codemirror editor. Ideally, this should clear the textarea, remove all marks and clear the history.
What's the best way to achieve this?
cm.setValue("");
cm.clearHistory();
// cm.clearGutter("gutterId"); if you have gutters