Skip to content

Commit

Permalink
feat: expose cm6 instance for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Nov 3, 2024
1 parent f2f7393 commit e49aa4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<h2>V3</h2>

* `3.8.0`: expose cm6 instance for dev
* `3.7.0`: better newline extension for current line
* `3.7.0`: `ctrl+click` to double click for tiddler navigation
* `3.6.1`: update readme video tutorial
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"registry": "https://registry.npmjs.org"
},
"license": "MIT",
"version": "3.7.2",
"version": "3.8.0",
"packageManager": "pnpm@9.0.6",
"scripts": {
"update:config": " pnpm ts-node scripts/generateConfig.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/tiddlywiki-codemirror-6/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class CodeMirrorEngine {
// head: 3
// },
});

// 存储实例在 DOM 元素上
this.domNode.cm6 = this.editor;

// @see https://github.com/replit/codemirror-vim/issues/6
if (cm6.keymap() === 'vim' && cm6.insertModeFirst() && !options.value) {
let editor = getCM(this.editor);
Expand Down
2 changes: 1 addition & 1 deletion src/tiddlywiki-codemirror-6/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/oeyoews/tiddlywiki-codemirror-6",
"name": "CodeMirror6",
"description": "CodeMirror 6 editor",
"version": "3.7.2",
"version": "3.8.0",
"core-version": ">=5.3.4",
"list": "readme settings changelog ",
"stability": "STABILITY_2_STABLE"
Expand Down

0 comments on commit e49aa4a

Please sign in to comment.