Rich text / foldkit-richtext-markdown

openSource

function · packages/richtext-markdown/src/source.ts:46

function openSource(
  document: RichText.Document,
  options?: OpenOptions,
): SourceSession

Opens a session on a document: its Markdown, as both what was printed and the draft, spelled as style says, so a writer's _hello_ comes back as they wrote it, with the caret where the selection's focus was. A node selection, or none, puts the caret at the start.