QuillEditorController class
QuillEditorController controller constructor to generate editor, toolbar state keys
Constructors
- QuillEditorController.new()
- QuillEditorController controller constructor to generate editor, toolbar state keys
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnable ↔ bool
-
isEnable to enable/disable editor
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
toolBarKey
→ GlobalKey<
ToolBarState> ? -
to access toolbar key from toolbar widget
no setter
Methods
-
clear(
) → void - clear method is used to clear the editor
-
clearHistory(
) → void - clearHistory method to clear the history stack of editor
-
dispose(
) → void - dispose dispose function to close the stream
-
embedImage(
String imgSrc) → Future - embedImage method is used to insert image to the editor
-
embedVideo(
String url) → Future - embedVideo method is used to embed url of video to the editor
-
enableEditor(
bool enable) → void - enableEditor method is used to enable/ disable the editor, while, we can enable or disable the editor directly by passing isEnabled to the widget, this is an additional function that can be used to do the same with the state key We can choose either of these ways to enable/disable
-
focus(
) → Future - focus method is used to request focus of the editor
-
getDelta(
) → Future< Map> - getDelta method is used to get the delta map from editor
-
getPlainText(
) → Future< String> - getPlainText method is used to get the plain text from the editor
-
getSelectedHtmlText(
) → Future - getSelectedHtmlText method to get the selected html text from editor
-
getSelectedText(
) → Future - getSelectedText method to get the selected text from editor
-
getSelectionRange(
) → Future< SelectionModel> - getSelectionRange to get the text selection range from editor
-
getText(
) → Future< String> - getText method is used to get the html string from the editor To avoid getting empty html tags, we are validating the html string if it doesn't contain any text, the method will return empty string instead of empty html tag
-
hasFocus(
) → Future< int> - hasFocuschecks if the editor has focus, returns the selection string length
-
insertTable(
int row, int column) → Future - insertTable method is used to insert table by row and column to the editor
-
insertText(
String text, {int? index}) → Future - insertText method is used to insert the html text to the editor if the index is not passed, it will insert the text at cursor position
-
modifyTable(
EditTableEnum type) → Future - modifyTable method is used to add or remove, rows or columns of the table
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onTextChanged(
dynamic data(String)) → void - onTextChanged method is used to listen to editor text changes
-
redo(
) → void - redo method to redo the changes in editor
-
replaceText(
String text) → Future - replaceText method is used to replace the selected text in the editor custom format for replaced text will come in future release
-
requestFocus(
) → void - requestFocus method is to request focus of the editor
-
setDelta(
Map delta) → Future - setDelta method is used to set delta to the editor it will override the existing text in the editor with the new one
-
setFormat(
{required String format, required dynamic value}) → void - setFormat sets the format to editor either by selection or by cursor position
-
setSelectionRange(
int index, int length) → Future - setSelectionRange to select the text in the editor by index
-
setText(
String text) → Future - setText method is used to set the html text to the editor it will override the existing text in the editor with the new one
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → void - undo method to undo the changes in editor
-
unFocus(
) → void - unFocus method is to un focus the editor
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited