Module richtext

Module richtext 

Source
Expand description

§Index

There are several types of indexes:

  • Unicode index: the index of a unicode code point in the text.
  • Entity index: unicode index + style anchor index. Each unicode code point or style anchor is an entity.
  • Utf16 index

In crate::op::Op, we always use entity index to persist richtext ops.

The users of this type can only operate on unicode index or utf16 index, but calculated entity index will be provided.

Structs§

RichtextSpan
This is the data structure that represents a span of rich text. It’s used to communicate with the frontend.
Style
This is used to communicate with the frontend.
StyleOp
TextStyleInfoFlag
TODO: We can remove this type already

Enums§

AnchorType
ExpandType
Whether to expand the style when inserting new text around it.