This is the code I introduced markdown and used
...
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
new EditorView({
state: EditorState.create({
doc: '',
extensions: [
markdown({
base: markdownLanguage
}),
keymap.of([defaultTabBinding, ...defaultKeymap, ...historyKeymap, ...closeBracketsKeymap]),
],
...
})
});
The problems are as follows
When I enter “-” and enter the content, then enter. A new line will be generated and start with “-”. Then I press the delete key. It doesn’t seem to delete normally. After deleting, there will be an extra space. At the same time, I continue to enter content in the current line, and then press enter to bring the characters into the new line
demo
Here is a dynamic example of GIF