Markdown processing

When the editor state changes, MDXEditor converts the lexical node tree to a markdown tree. Then, the resulting markdown tree is converted to a markdown string using the toMarkdown utility. This is a great point for you to change stylistic preferences like bullet markers or how whitespace is treated.

To control the options of the toMarkdown invocation, pass your preferences through the toMarkdownOptions property. Those values get passed to options argument of the toMarkdown call.

By default, the MDXEditor uses the following options:

const DEFAULT_MARKDOWN_OPTIONS: ToMarkdownOptions = {
  listItemIndent: 'one'
}