From 99f40352142f79017458630581ff4032a8dfd7a3 Mon Sep 17 00:00:00 2001 From: lishid Date: Thu, 29 Oct 2020 17:36:03 -0400 Subject: [PATCH] Add example for modifying CodeMirror. --- main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.ts b/main.ts index d1c2a32..82b60e5 100644 --- a/main.ts +++ b/main.ts @@ -33,6 +33,10 @@ export default class MyPlugin extends Plugin { }); this.addSettingTab(new SampleSettingTab(this.app, this)); + + this.registerEvent(this.app.on('codemirror', (cm: CodeMirror.Editor) => { + // Modify CodeMirror here... + })); } onunload() {