Document class
The rich text document
Constructors
- Document()
- Creates new empty document.
- Document.fromDelta(Delta delta)
-
Creates new document from provided
delta
. - Document.fromJson(List data)
-
Creates new document from provided JSON
data
.
Properties
-
changes
→ Stream<
DocChange> -
Stream of DocChanges applied to this document.
no setter
-
documentChangeObserver
→ StreamController<
DocChange> -
final
- editorConfigurations ↔ QuillEditorConfigurations
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRedo → bool
-
no setter
- hasUndo → bool
-
no setter
- history → History
-
final
- length → int
-
Length of this document.
no setter
- root → Root
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchConfigurations → QuillSearchConfigurations
-
no setter
Methods
-
close(
) → void -
collectAllIndividualStyleAndEmbed(
int index, int len) → List< OffsetValue> - Returns all styles and Embed for each node within selection
-
collectAllStyles(
int index, int len) → List< Style> - Returns all styles for any character within the specified text range.
-
collectAllStylesWithOffset(
int index, int len) → List< OffsetValue< Style> > - Returns all styles for any character within the specified text range.
-
collectStyle(
int index, int len) → Style - Only attributes applied to all characters within this range are included in the result. Special case of no-selection at start of empty line: gets inline style(s) from preceding non-empty line.
-
compose(
Delta delta, ChangeSource changeSource) → void -
Composes
change
Delta into this document. -
delete(
int index, int len) → Delta -
Deletes length of characters from this document starting at
index
. -
format(
int index, int len, Attribute? attribute) → Delta -
Formats segment of this document with specified
attribute
. -
getPlainText(
int index, int len, [bool includeEmbeds = false]) → String - Returns plain text within the specified text range.
-
insert(
int index, Object? data, {int replaceLength = 0}) → Delta -
Inserts
data
in this document at specifiedindex
. -
isEmpty(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryChild(
int offset) → ChildQuery -
Returns Line located at specified character
offset
. -
querySegmentLeafNode(
int offset) → SegmentLeafNode - Given offset, find its leaf node in document
-
redo(
) → HistoryChanged -
replace(
int index, int len, Object? data) → Delta -
Replaces length of characters starting at
index
withdata
. -
search(
String substring, {bool caseSensitive = false, bool wholeWord = false}) → List< int> -
Search given
substring
in the whole document SupportscaseSensitive
andwholeWord
options Returns correspondent offsets -
setCustomRules(
List< Rule> customRules) → void -
toDelta(
) → Delta - Returns contents of this document as Delta.
-
toPlainText(
[Iterable< EmbedBuilder> ? embedBuilders, EmbedBuilder? unknownEmbedBuilder]) → String - Returns plain text representation of this document.
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → HistoryChanged
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited