commit 99f40352142f79017458630581ff4032a8dfd7a3 parent 2d6aebfe0a4e7d6fd5953142c5edc662f709ae3d Author: lishid <lishid@gmail.com> Date: Thu, 29 Oct 2020 17:36:03 -0400 Add example for modifying CodeMirror. Diffstat:
M | main.ts | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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() {