Rich text / foldkit-mixins-richtext
The status line
How long the document is, and what the application found wrong with it. It sends nothing.
ts
import * as RichText from 'foldkit-richtext'
import { editorStatus } from 'foldkit-mixins-richtext'
editorStatus<Message>()(
{ document: model.document, diagnostics: RichText.validate(model.document, ArticleKit) },
h,
)The counts are RichText.count: words and characters as Intl.Segmenter splits them, kept per
document value so a caret move does not count again. The problems are whatever diagnostics
holds, one item each; the view does not validate, because which Kit a document answers to is
the application's. Leave diagnostics out and none is shown.
| Slot | Capability | Renders |
|---|---|---|
root | Container | the status line's wrapper |
counts | Base | 2 words · 11 characters, data-status="counts" |
problems | Collection | the list, data-status="problems" |
problem | Base | one diagnostic, data-code, and data-node when it has one |