NotusDocument class

A rich text document.

Constructors

NotusDocument()
Creates new empty Notus document.
NotusDocument.fromDelta(Delta delta)
NotusDocument.fromJson(List data)

Properties

changes Stream<NotusChange>
Stream of NotusChanges applied to this document.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
isClosed bool
Returns true if this document and associated stream of changes is closed.
read-only
length int
Length of this document.
read-only
root RootNode
The root node of this document tree.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

close() → void
Closes changes stream.
collectStyle(int index, int length) NotusStyle
Returns style of specified text range.
compose(Delta change, ChangeSource source) → void
Composes change into this document.
delete(int index, int length) Delta
Deletes length of characters from this document starting at index.
format(int index, int length, NotusAttribute attribute) Delta
Formats segment of this document with specified attribute.
insert(int index, String text) Delta
Inserts text in this document at specified index.
lookupLine(int offset) LookupResult
Returns LineNode located at specified character offset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
replace(int index, int length, String text) Delta
Replaces length of characters starting at index text.
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.
override

Operators

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