overleaf/services/web/public/es/rich-text.js
Alasdair Smith 94b7cdcae0 Fix linting
2018-02-23 11:29:54 +00:00

11 lines
218 B
JavaScript

import CodeMirror, { Doc } from 'codemirror'
export function init (rootEl) {
return CodeMirror(rootEl)
}
export function openDoc (cm, content) {
const newDoc = Doc(content)
cm.swapDoc(newDoc)
return newDoc
}