QuillEditorController class
QuillEditorController controller constructor to generate editor, toolbar state keys
Constructors
- QuillEditorController()
- A controller for the Quill editor.
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 - Requests focus for the editor.
-
getDelta(
) → Future< Map> - Retrieves the Delta map from the editor.
-
getPlainText(
) → Future< String> - Retrieves the plain text content 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 - Inserts a table into the editor.
-
insertText(
String text, {int? index}) → Future - Inserts HTML text into the editor.
-
modifyTable(
EditTableEnum type) → Future - Modifies an existing table in the editor.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEditorLoaded(
VoidCallback callback) → void - Callback function triggered when the editor is completely loaded.
-
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 - Replaces the selected text in the editor.
-
requestFocus(
) → void - requestFocus method is to request focus of the editor
-
setDelta(
Map delta) → Future - Sets the Delta object in the editor.
-
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 - Sets the HTML text content in the editor.
-
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