I just found this codemirror project and I’ve started with version 6. When testing it, I noticed that the tab key doesn’t insert a tab. I check out an older version and tab works in there.
Is tab just not defined in version 6 yet or is there something I need to set up?
Thanks but I really need tabs to works so I can add it. Based on the link you gave me, I tried the following code but it doesn’t work. I get cannot find name ‘keymap’. What am I doing wrong?
Not importing it, it seems (import {keymap} from "@codemirror/next/view"). Also, you’re passing it an invalid argument—you need ... in front of defaultKeymap for it to become part of the outer array.
I was able to get codemirror V6 to enter a tab character but it is always at the beginning of the line. How do I get the insert to be a the carat position? Here is the code I copied.
As a follow up – is there a convenient command for “indent if at the beginning of line, but insert tab character in the middle of the line”? (This is sort of what Eclipse seems to do)