Closed ieteo closed 2 years ago
Can’t promise anything, but will have a look into this.
Thank you for considering it.
I believe this would be a welcome addition, since without the TAB functionality writing nested lists is of a little pain.
The activation of TAB handling itself is easy
File: src/components/Editor.js
Line 4
From : import { standardKeymap} from "@codemirror/commands";
To : import { standardKeymap, indentWithTab} from "@codemirror/commands";
Line 69 From:
return keymap.of([
...standardKeymap,
...historyKeymap,
...customKeymap,
]);
To:
return keymap.of([
...standardKeymap,
...historyKeymap,
...customKeymap,
indentWithTab
]);
The problem of custom tweaking is, that it have to be done on every update or deployment. Since composer update|install
overwrites the changes.
An option to activate the TAB would be vey helpful here. Even have this turned on by default and letting users know that TABing to next field can be done with:
Press Escape, then Tab to move to this field. Or Escape, Shift-Tab to move to the field before the editor.(Option+Tab on Mac)
@ieteo I finally had a few minutes for looking into this. I decided against adding this to the core, because I’m afraid that this already by far the largest JavaScript project I’ve ever managed, and I don’t want it to become bloated. So I added a generic extension API and added your requested feature as a separate extension to the extension-examples/indent-with-tab
folder. Please let me know whether this solves your problem. :-)
See https://github.com/fabianmichael/kirby-markdown-field/releases/tag/2.0.0-rc2
@fabianmichael Yes it has :-)
Thank you!
Version: 2.0.0-rc1
Hello,
could you add an option to turn on TAB handling please
https://codemirror.net/6/examples/tab/
Thank you