QuillText class base

A span of formatted text within a line in a Quill document.

Text is a leaf node of a document tree.

Parent of a text node is always a Line, and as a consequence text node's value cannot contain any line-break characters.

See also:

  • Embed, a leaf node representing an embeddable object.
  • Line, a node representing a line of text.

Update: The reason we are renamed quill Text to QuillText so it doesn't conflict with the one from the widgets, material or cupertino library

Inheritance

Constructors

QuillText([String text = ''])

Properties

documentOffset int
Offset in characters of this node in the document.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isFirst bool
Returns true if this node is the first node in the parent list.
no setterinherited
isLast bool
Returns true if this node is the last node in the parent list.
no setterinherited
length int
Length of this node in characters.
no setterinherited
list LinkedList<Node>?
The linked list containing this element.
no setterinherited
next Node?
The successor of this element in its linked list.
no setterinherited
offset int
Offset in characters of this node relative to parent node.
no setterinherited
parent Line?
Current parent of this node. May be null if this node is not mounted.
getter/setter pairinherited
previous Node?
The predecessor of this element in its linked list.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style Style
The style attributes Note: This is not the same as style attribute of css
no setterinherited
value String
Contents of this node, either a String if this is a QuillText or an Embed if this is an BlockEmbed.
getter/setter pairinherited-setteroverride-getter

Methods

adjust() → void
Adjust this text node by merging it with adjacent nodes if they share the same style.
inherited
applyAttribute(Attribute attribute) → void
inherited
applyStyle(Style value) → void
inherited
clearLengthCache() → void
inherited
clearOffsetCache() → void
inherited
clearStyle() → void
inherited
clone() Node
inherited
containsOffset(int offset) bool
Returns true if this node contains character at specified offset in the document.
inherited
cutAt(int index) Leaf?
Cuts a leaf from index to the end of this node and returns new node in detached state (e.g. mounted returns false).
inherited
delete(int index, int? len) → void
inherited
format(Style? style) → void
Formats this node and optimizes it with adjacent leaf nodes if needed.
inherited
insert(int index, Object data, Style? style) → void
inherited
insertAfter(Node entry) → void
Insert an element after this element in this element's linked list.
inherited
insertBefore(Node entry) → void
Insert an element before this element in this element's linked list.
inherited
newInstance() Node
abstract methods begin
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retain(int index, int? len, Style? style) → void
inherited
splitAt(int index) Leaf?
Splits this leaf node at index and returns new node. If this is the last node in its list and index equals this node's length then this method returns null as there is nothing left to split. If there is another leaf node after this one and index equals this node's length then the next leaf node is returned.
inherited
toDelta() Delta
inherited
toPlainText([Iterable<EmbedBuilder>? embedBuilders, EmbedBuilder? unknownEmbedBuilder]) String
override
toString() String
A string representation of this object.
inherited
Unlink the element from its linked list.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited