QuoteNode class
A block quote.
It carries no fields of its own — only the element base shape — so the whole implementation is its type string and its clone.
- Inheritance
-
- Object
- LexicalNode
- ElementNode
- QuoteNode
- Available extensions
Constructors
- QuoteNode()
- Creates an empty quote.
Properties
- canBeEmpty → bool
-
Whether this element may exist with no children.
no setterinherited
- canIndent → bool
-
Whether this element accepts indentation.
no setterinherited
- canInsertTextAfter → bool
-
Whether text may be inserted immediately after this element.
no setterinherited
- canInsertTextBefore → bool
-
Whether text may be inserted immediately before this element.
no setterinherited
-
children
→ Iterable<
LexicalNode> -
The children in document order, walked lazily through the pointers.
no setterinherited
- childrenSize → int
-
Number of children.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexWithinParent → int
-
This node's position among its parent's children.
no setterinherited
- isAttached → bool
-
Whether a path exists from this node to the root.
no setterinherited
- isDirty → bool
-
Whether this node was modified during the current update.
no setterinherited
- isEmpty → bool
-
Whether this element has no children.
no setterinherited
- isInline → bool
-
Whether this node participates in inline text flow.
no setterinherited
- isShadowRoot → bool
-
Whether this element behaves as a root for containment purposes.
no setterinherited
- key → NodeKey
-
This node's identity within the editor state.
no setterinherited
- nodeState → NodeState
-
Extension data for this node, created on first access.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The wire-format
typestring of this node.no setteroverride
Methods
-
afterCloneFrom(
covariant ElementNode prev) → void -
Copies mutable state that the constructor does not carry.
inherited
-
append(
LexicalNode node) → ElementNode -
Appends
nodeas the last child of this element.inherited -
appendAll(
Iterable< LexicalNode> nodes) → ElementNode -
Appends several nodes in one operation.
inherited
-
clear(
) → ElementNode -
Removes every child.
inherited
-
clone(
) → QuoteNode -
Creates a new instance of this node's class carrying its constructor
state.
override
-
collapseAtStart(
) → bool -
Handles backspace at the very start of this element, with nothing before
it to delete.
override
-
exportJson(
) → Map< String, Object?> -
Serializes this node to its wire-format JSON object.
inherited
-
getAllTextNodes(
) → List< LexicalNode> -
The descendant text and inline nodes of this element, in order.
inherited
-
getChildAtIndex(
int index) → LexicalNode? -
The child at
index, ornullwhen out of range.inherited -
getCommonAncestor(
LexicalNode other) → ElementNode? -
The closest element that contains both this node and
other.inherited -
getDescendantByIndex(
int index) → LexicalNode? -
The leaf at child
index, reaching into nested elements.inherited -
getDirection(
) → NodeDirection? -
Resolved writing direction, or
nullwhen undetermined.inherited -
getFirstChild(
) → LexicalNode? -
The first child, or
nullwhen empty.inherited -
getFirstDescendant(
) → LexicalNode? -
The first leaf under this element, or
nullwhen it holds nothing.inherited -
getFormat(
) → ElementFormat -
Block alignment.
inherited
-
getIndent(
) → int -
Nesting level.
inherited
-
getLastChild(
) → LexicalNode? -
The last child, or
nullwhen empty.inherited -
getLastDescendant(
) → LexicalNode? -
The last leaf under this element, or
nullwhen it holds nothing.inherited -
getLatest<
T extends LexicalNode> () → T -
Resolves this node's current version from the active editor state.
inherited
-
getNextSibling(
) → LexicalNode? -
The next sibling, or
nullwhen this is the last child.inherited -
getNextSiblings(
) → List< LexicalNode> -
All siblings after this node, in document order.
inherited
-
getNodesBetween(
LexicalNode target) → List< LexicalNode> -
Every node between this one and
target, inclusive, in document order.inherited -
getParent(
) → ElementNode? -
This node's parent element, or
nullwhen detached.inherited -
getParentOrThrow(
) → ElementNode -
This node's parent element, or throws when detached.
inherited
-
getParents(
) → List< ElementNode> -
The ancestors of this node, closest first.
inherited
-
getPreviousSibling(
) → LexicalNode? -
The previous sibling, or
nullwhen this is the first child.inherited -
getPreviousSiblings(
) → List< LexicalNode> -
All siblings before this node, in document order.
inherited
-
getTextContent(
) → String -
The plain-text projection of this node.
inherited
-
getTextContentSize(
) → int -
Length of getTextContent in UTF-16 code units.
inherited
-
getTextFormat(
) → int -
The caret's pending text format for this block.
inherited
-
getTextStyle(
) → String -
The caret's pending text style for this block.
inherited
-
getTopLevelElement(
) → LexicalNode? -
The top-level block containing this node, or
nullfor the root.inherited -
getWritable<
T extends LexicalNode> () → T -
Returns a mutable version of this node, cloning it if necessary.
inherited
-
insertAfter<
T extends LexicalNode> (T nodeToInsert) → T -
Inserts
nodeToInsertdirectly after this node.inherited -
insertBefore<
T extends LexicalNode> (T nodeToInsert) → T -
Inserts
nodeToInsertdirectly before this node.inherited -
insertChildAtStart(
LexicalNode node) → ElementNode -
Inserts
nodebefore every existing child.inherited -
insertNewAfter(
{required bool isAtEnd}) → ElementNode -
Creates and inserts the element that follows this one when the user
splits it — the block Enter produces.
override
-
isBefore(
LexicalNode target) → bool -
Whether this node precedes
targetin document order.inherited -
isParentOf(
LexicalNode target) → bool -
Whether this node is an ancestor of
target.inherited -
isSameNode(
LexicalNode? other) → bool -
Whether
otherrefers to the same node, ignoring version.inherited -
markDirty(
) → void -
Marks this node dirty so the next commit reconciles it.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patchStyle(
StylePatch patch) → void -
Available on ElementNode, provided by the ElementNodeStylePatch extension
Appliespatchto this element's ElementNode.getTextStyle. -
remove(
{bool preserveEmptyParent = false}) → void -
Detaches this node from its parent.
inherited
-
replace<
T extends LexicalNode> (T replaceWith, {bool includeChildren = false}) → T -
Replaces this node with
replaceWith, optionally moving children over.inherited -
select(
[int? anchorOffset, int? focusOffset]) → RangeSelection -
Available on ElementNode, provided by the ElementNodeSelection extension
Selects a range of this element's children, by index. -
selectEnd(
) → RangeSelection -
Available on ElementNode, provided by the ElementNodeSelection extension
Places a collapsed selection at the end of this element's content. -
selectNext(
) → void -
Available on LexicalNode, provided by the LexicalNodeSelection extension
Places a collapsed selection immediately after this node. -
selectPrevious(
) → void -
Available on LexicalNode, provided by the LexicalNodeSelection extension
Places a collapsed selection immediately before this node. -
selectStart(
) → RangeSelection -
Available on ElementNode, provided by the ElementNodeSelection extension
Places a collapsed selection at the start of this element's content. -
setDirection(
NodeDirection? value) → ElementNode -
Sets the writing direction.
inherited
-
setFormat(
ElementFormat value) → ElementNode -
Sets block alignment.
inherited
-
setIndent(
int value) → ElementNode -
Sets the nesting level.
inherited
-
setTextFormat(
int value) → ElementNode -
Sets the caret's pending text format.
inherited
-
setTextStyle(
String value) → ElementNode -
Sets the caret's pending text style.
inherited
-
splice(
int start, int deleteCount, List< LexicalNode> nodesToInsert) → ElementNode -
Replaces
deleteCountchildren starting atstartwithnodesToInsert.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
updateFromJson(
Map< String, Object?> json) → void -
Applies a serialized node's fields to this instance.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited