Milkdown / website

The official documentation website for milkdown.
https://milkdown.dev
MIT License
31 stars 101 forks source link

Problems with Editing Headings #9

Closed wangcaidev closed 1 year ago

wangcaidev commented 1 year ago

When I type # with a space before H2, it doesn’t switch to H1; instead, it switches to H3. In ProseMirror and most markdown editors, this operation should switch to the H1 style. I'm worried that my description may be difficult to understand, so I've attached a reference video demo the operation.

Thank you to the author for maintaining this project, it has been very helpful to me. If there is a donation channel available, I would be very happy to contribute what little I can.

https://user-images.githubusercontent.com/6829176/229217925-325c4bcd-7581-4639-b101-3cbb1fa11794.mov

Saul-Mirone commented 1 year ago

In fact, it's a feature to help users switch title faster. BTW, press <delete> at the start of a title will downgrade the title, for example, h2 will become h1. https://github.com/Milkdown/milkdown/blob/main/packages/preset-commonmark/src/node/heading.ts#L83