diff --git a/packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.ts b/packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.ts index 7a9d5a1c9..7e57e3533 100644 --- a/packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.ts +++ b/packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.ts @@ -426,6 +426,12 @@ export default class CodeMirror5Emulation extends BaseCodeMirror5Emulation { ); } + public getDoc() { + // The emulation layer has several of the methods available on a CodeMirror 5 document. + // For some plugins, `this` is sufficient. + return this; + } + public static commands = (() => { const commands: Record = { ...BaseCodeMirror5Emulation.commands,