Skip to main content

Module rich

Module rich 

Source
Expand description

Rich text as a window shows it (Value::Rich). Rich text as a component shows it: paragraphs with their marks, and how each reference in them reads for the person reading.

The paragraphs are tilo-doc’s, as the app keeps them (kind, text, marks counted in characters, attributes). A reference is a run marked mention, valued with what it refers to (tilo_reference::embed); beside the paragraphs, RichText::embeds says how each reference reads for this reader, resolved where the text was read, under their permissions.

A paragraph projecting a reference (a transclusion or an embed) carries that reference’s first content as the entry’s preview: one level deep, every reference inside it a link, so a note embedding a note that embeds a note never opens out twice.

A window’s patches are encoded without field names (postcard), so every field is always written.

Structs§

Block
One paragraph: its kind (paragraph, heading, list_item, quote, divider), its text, the marks over runs of it and its attributes (level, ordered).
Embed
How one reference reads for the person reading.
Mark
A mark over the characters start..end of a paragraph’s text.
RichText
Rich text, with how its references read for the person reading it.
Run
A stretch of a projected reference’s content: its text, and what it refers to when it refers to something (drawn as a link, never opened out).

Enums§

Attr
The value of a mark or an attribute.
InlineView
A reference as it reads inline: the reader’s inline view of its type.