RichTextCodec.value
property · packages/richtext-dom/src/input.ts:78
readonly value: (document: RichText.Document) => AThe key's value for a document the editor holds. It is never called with a blank one.
Rich text / foldkit-richtext-dom/input
interface · packages/richtext-dom/src/input.ts:76
interface RichTextCodec<A> {
readonly value: (document: RichText.Document) => A
readonly blank?: A | undefined
readonly fill: (value: A) => RichText.Document
}How a key holds a type other than a RichText.Document while the editor still holds one: a
stored Markdown text, say. value runs on every read of the key and fill on a given value, so
both stay a plain function of their argument. fill is called with stored data and may throw,
which fails the form's fill as any control that cannot show a value does.
RichTextCodec.valueproperty · packages/richtext-dom/src/input.ts:78
readonly value: (document: RichText.Document) => AThe key's value for a document the editor holds. It is never called with a blank one.
RichTextCodec.blankproperty · packages/richtext-dom/src/input.ts:83
readonly blank?: A | undefinedThe key's value for a blank document, where nothing entered is a value of its own (an empty text, not "required"). Absent, a blank document is no value and a required key refuses it.
RichTextCodec.fillproperty · packages/richtext-dom/src/input.ts:85
readonly fill: (value: A) => RichText.DocumentThe document the editor shows for a value the form was given.