diff --git a/src/code_manager/model/CodeMirrorEditor.js b/src/code_manager/model/CodeMirrorEditor.js index ae1300898..530c8f06c 100644 --- a/src/code_manager/model/CodeMirrorEditor.js +++ b/src/code_manager/model/CodeMirrorEditor.js @@ -51,6 +51,24 @@ module.exports = Backbone.Model.extend({ return this; }, + /** + * Refresh the viewer + * @return {self} + */ + refresh() { + this.getEditor().refresh(); + return this; + }, + + /** + * Focus the viewer + * @return {self} + */ + focus() { + this.getEditor().focus(); + return this; + }, + getContent() { const ed = this.getEditor(); return ed && ed.getValue();