How can I set headless mode? #107
-
Hi folks, I noticed there is a |
Beta Was this translation helpful? Give feedback.
Answered by
Saul-Mirone
Aug 21, 2021
Replies: 1 comment 3 replies
-
For now, you can set it like this: import { commonmarkNodes, commonmarkPlugins, heading, paragraph } from '@milkdown/preset-commonmark';
const nodes = commonmark
.configure(paragraph, {
headless: true
})
.configure(heading, {
headless: true
});
new Editor().use(nodes).use(commonmarkPlugins); There is a feature that is not released yet, that you can simple set all nodes to headless like: const nodes = commonmark.headless();
new Editor().use(nodes).use(commonmarkPlugins); I still need to make sure all plugins and nodes support headless mode before ship this feature, but it won't take long time. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Saul-Mirone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For now, you can set it like this:
There is a feature that is not released yet, that you can simple set all nodes to headless like:
I still need to make sure all plugins and nodes support headless mode before ship this feature, but it won't take long time.