EmbedNode class

An embed node inside of a line in a Notus document.

Embed node is a leaf node similar to TextNode. It represents an arbitrary piece of non-text content embedded into a document, such as, image, horizontal rule, video, or any other object with defined structure, like tweet, for instance.

Embed node's length is always 1 character and it is represented with zero-width space in the document text.

Any inline style can be applied to an embed, however this does not necessarily mean the embed will look according to that style. For instance, applying "bold" style to an image gives no effect, while adding a "link" to an image actually makes the image react to user's action.

Inheritance

Constructors

EmbedNode()

Properties

documentOffset int
Offset in characters of this node in the document.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
isFirst bool
Returns true if this node is the first node in the parent list.
read-only, inherited
isLast bool
Returns true if this node is the last node in the parent list.
read-only, inherited
length int
Length of this node in characters.
read-only, inherited
list LinkedList<Node>
Get the linked list containing this element. [...]
read-only, inherited
mounted bool
Returns true if this node is currently mounted, e.g. parent is not null.
read-only, inherited
next Node
Return the successor of this element in its linked list. [...]
read-only, inherited
offset int
Offset in characters of this node relative to parent node. [...]
read-only, inherited
parent LineNode
Current parent of this node. May be null if this node is not mounted.
read-only, inherited
previous Node
Return the predecessor of this element in its linked list. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
style NotusStyle
Style of this node.
read-only, inherited
value String
Plain-text value of this node.
read-only, inherited

Methods

applyAttribute(NotusAttribute attribute) → void
Applies style attribute to this node.
inherited
applyStyle(NotusStyle value) → void
Applies new style value to this node. Provided value is merged into current style.
inherited
clearStyle() → void
Clears style of this node.
inherited
containsOffset(int offset) bool
Returns true if this node contains character at specified offset in the document.
inherited
cutAt(int index) LeafNode
Cuts a leaf node 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 length) → void
Delete length characters of this node starting from index.
inherited
formatAndOptimize(NotusStyle style) → void
Formats this node and optimizes it with adjacent leaf nodes if needed.
inherited
insert(int index, String value, NotusStyle style) → void
Insert text at specified character index with style style.
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
isolate(int index, int length) LeafNode
Isolates a new leaf node starting at index with specified length. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
optimize() → void
Optimizes this text node by merging it with adjacent nodes if they share the same style.
inherited
retain(int index, int length, NotusStyle style) → void
Format length characters of this node starting from index with specified style style.
inherited
splitAt(int index) LeafNode
Splits this leaf node at index and returns new node. [...]
inherited
toDelta() Delta
Returns Delta representation of this node.
inherited
toPlainText() String
Returns plain-text representation of this node.
inherited
toString() String
Returns a string representation of this object.
inherited
Unlink the element from its linked list. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Properties

kPlainTextPlaceholder String
final