Skip to content

Commit ab2335d

Browse files
authored
feat(plugin-api): expose isCodeMirror flag on editorManager (#1892)
1 parent 5bfd76b commit ab2335d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ interface Window {
6969

7070
interface EditorManager {
7171
editor?: import("@codemirror/view").EditorView;
72+
isCodeMirror?: boolean;
7273
activeFile?: AcodeFile;
7374
getLspMetadata?: (file: AcodeFile) => LspFileMetadata | null;
7475
}

src/lib/editorManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,7 @@ async function EditorManager($header, $body) {
11921192
files: [],
11931193
onupdate: () => {},
11941194
activeFile: null,
1195+
isCodeMirror: true,
11951196
addFile,
11961197
editor,
11971198
readOnlyCompartment,

src/test/ace.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export async function runAceCompatibilityTests(writeOutput) {
3434
);
3535
});
3636

37+
runner.test("editorManager isCodeMirror flag", (test) => {
38+
test.assertEqual(editorManager.isCodeMirror, true);
39+
});
40+
3741
runner.test("editor.getValue()", (test) => {
3842
const editor = getEditor();
3943
test.assert(

0 commit comments

Comments
 (0)