Rich text / foldkit-mixins-richtext

SourceEditorInput

interface · packages/mixins-richtext/src/source.ts:33

interface SourceEditorInput<Message> {
  readonly session: SourceSession
  readonly document: RichText.Document
  readonly drafted: (draft: string) => Message
  readonly moved: (caret: number) => Message
  readonly done: Message
}

Members

SourceEditorInput.session

property · packages/mixins-richtext/src/source.ts:34

readonly session: SourceSession

SourceEditorInput.document

property · packages/mixins-richtext/src/source.ts:36

readonly document: RichText.Document

The document the session was opened on, which the application still holds.

SourceEditorInput.drafted

property · packages/mixins-richtext/src/source.ts:38

readonly drafted: (draft: string) => Message

What the text area sends as the Markdown changes: the next draft.

SourceEditorInput.moved

property · packages/mixins-richtext/src/source.ts:40

readonly moved: (caret: number) => Message

What the text area sends as its caret moves: the session's next caret (§147).

SourceEditorInput.done

property · packages/mixins-richtext/src/source.ts:42

readonly done: Message

What the way back sends.