ParchmentDocument class

A rich text document.


ParchmentDocument({ParchmentHeuristics heuristics = ParchmentHeuristics.fallback})
Creates new empty Parchment document.
ParchmentDocument.fromDelta(Delta delta, {ParchmentHeuristics heuristics = ParchmentHeuristics.fallback})
Creates new ParchmentDocument from provided delta.
ParchmentDocument.fromJson(List data, {ParchmentHeuristics heuristics = ParchmentHeuristics.fallback})
Creates new ParchmentDocument from provided JSON data.


changes Stream<ParchmentChange>
Stream of ParchmentChanges applied to this document.
no setter
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Returns true if this document and associated stream of changes is closed.
no setter
length int
Length of this document.
no setter
root RootNode
The root node of this document tree.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


close() → void
Closes changes stream.
collectStyle(int index, int length) ParchmentStyle
Returns style of specified text range.
compose(Delta change, ChangeSource source) → void
Composes change Delta into this document.
delete(int index, int length) → Delta
Deletes length of characters from this document starting at index.
format(int index, int length, ParchmentAttribute attribute) → Delta
Formats segment of this document with specified attribute.
insert(int index, Object data) → Delta
Inserts data in this document at specified index.
lookupLine(int offset) LookupResult
Returns LineNode located at specified character offset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
replace(int index, int length, Object data) → Delta
Replaces length of characters starting at index with data.
toDelta() → Delta
Returns contents of this document as Delta.
toJson() → dynamic
toPlainText() String
Returns plain text representation of this document.
toString() String
A string representation of this object.


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