TextTransforms extension

on

Methods

formatDelta(Selection? selection, Attributes attributes, {bool withUpdateSelection = true, Map? selectionExtraInfo}) Future<void>
format the delta at the given selection.
formatNode(Selection? selection, Node nodeBuilder(Node node), {Map? selectionExtraInfo}) Future<void>
format the node at the given selection.
getDeltaAttributeValueInSelection<T>(String key, [Selection? selection]) → T?
Get the attributes in the given selection.
getTextInSelection([Selection? selection]) List<String>
Get the text in the given selection.
insertNewLine({Position? position, Node nodeBuilder(Node node)?}) Future<void>
Inserts a new line at the given position.
insertText(int index, String text, {Path? path, Node? node}) Future<void>
Insert text at the given index of the given Node or the Path.
insertTextAtCurrentSelection(String text) Future<void>
insertTextAtPosition(String text, {Position? position}) Future<void>
Inserts text at the given position. If the Position is not passed in, use the current selection. If there is no position, or if the selection is not collapsed, do nothing. Then it inserts the text at the given position.
toggleAttribute(String key, {Selection? selection, Map? selectionExtraInfo}) Future<void>
Toggles the given attribute on or off for the selected text.
updateNode(Selection? selection, Node nodeBuilder(Node node), {Map? selectionExtraInfo}) Future<void>
update the node attributes at the given selection.