(editor)
| 239 | } |
| 240 | |
| 241 | function revertCode(editor) { |
| 242 | let context = editor.state.facet(contextFacet) |
| 243 | editor.dispatch({ |
| 244 | selection: {anchor: 0}, |
| 245 | changes: {from: 0, to: editor.state.doc.length, insert: context.orig.textContent} |
| 246 | }) |
| 247 | } |
| 248 | |
| 249 | function showEditorControls(editor) { |
| 250 | if (editor.dom.parentNode.querySelector(".editor-controls")) return |
no test coverage detected