EditRule class abstract
A pure transformation from a document state plus an edit intent to the change Delta that should actually be composed into the document.
Rules are how a Quill editor turns raw user intents ("insert this text here", "make this range bold") into well-formed changes that respect the document's structure — e.g. a block format must land on newline positions only, and a block embed must live on its own line.
A rule inspects the current Delta of the document and either returns the
change delta to apply, or null when it does not handle this particular
edit (letting the next rule in the RuleSet try). Rules never mutate
anything: same inputs, same output.
Constructors
- EditRule()
-
Enables const constructors in subclasses.
const
Properties
Methods
-
apply(
Delta document, int index, {int? length, Object? data, Attribute< Object?> ? attribute, required AttributeRegistry registry}) → Delta? -
Produces the change delta for the edit intent, or
nullwhen this rule does not apply. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited