Rich text / foldkit-richtext-markdown

ClosedSource

interface · packages/richtext-markdown/src/source.ts:62

interface ClosedSource {
  readonly document: RichText.Document
  readonly changed: boolean
  readonly diagnostics: ReadonlyArray<MarkdownDiagnostic>
  readonly style: MarkdownStyle
  readonly selection: RichText.Selection | null
}

Members

ClosedSource.document

property · packages/richtext-markdown/src/source.ts:64

readonly document: RichText.Document

The document to continue with: the caller's own when the draft was not edited.

ClosedSource.changed

property · packages/richtext-markdown/src/source.ts:66

readonly changed: boolean

Whether the draft was edited, and so whether document is new.

ClosedSource.diagnostics

property · packages/richtext-markdown/src/source.ts:68

readonly diagnostics: ReadonlyArray<MarkdownDiagnostic>

What the document loses by the edit: the unprintable, then what parsing reported.

ClosedSource.style

property · packages/richtext-markdown/src/source.ts:73

readonly style: MarkdownStyle

The spellings to open the next session with: what the edited draft used, over what the session opened with, so a construct the draft no longer contains keeps its spelling.

ClosedSource.selection

property · packages/richtext-markdown/src/source.ts:78

readonly selection: RichText.Selection | null

The session's caret in document, as a caret selection; null when the draft holds no text to put it in, or when an unedited draft does not line up with the caller's document.