HtmlEditorController class

Fallback controller (should never be used)

Constructors

HtmlEditorController({bool processInputHtml = true, bool processNewLineAsBr = false, bool processOutputHtml = true})

Properties

characterCount int
Gets the current character count
getter/setter pair
editorController ↔ dynamic
Allows the InAppWebViewController for the Html editor to be accessed outside of the package itself for endless control and customization.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
processInputHtml bool
Determines whether text processing should happen on input HTML, e.g. whether a new line should be converted to a
.
final
processNewLineAsBr bool
Determines whether newlines (\n) should be written as
. This is not recommended for HTML documents.
final
processOutputHtml bool
Determines whether text processing should happen on output HTML, e.g. whether
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toolbar ToolbarWidgetState?
Toolbar widget state to call various methods. For internal use only.
getter/setter pair
viewId String?
Internal method to set the view ID when iframe initialization is complete
no getter

Methods

addNotification(String html, NotificationType notificationType) → void
Add a notification to the bottom of the editor. This is styled similar to Bootstrap alerts. You can set the HTML to be displayed in the alert, and the notificationType determines how the alert is displayed.
changeCase(String changed) → void
Internal function to change case on Web
changeLineHeight(String changed) → void
Internal function to change line height on Web
changeListStyle(String changed) → void
Internal function to change list style on Web
changeTextDirection(String changed) → void
Internal function to change text direction on Web
clear() → void
Clears the editor of any text.
clearFocus() → void
Clears the focus from the webview by hiding the keyboard, calling the clearFocus method on the InAppWebViewController, and resetting the height in case it was changed.
disable() → void
disables the Html editor
enable() → void
enables the Html editor
evaluateJavascriptWeb(String name, {bool hasReturnValue = false}) Future
A function to execute JS passed as a WebScript to the editor. This should only be used on Flutter Web.
execCommand(String command, {String? argument}) → void
A function to quickly call a document.execCommand function in a readable format
getSelectedTextWeb({bool withHtmlTags = false}) Future<String>
Gets the selected HTML from the editor. You should use controller.editorController.getSelectedText() on mobile.
getText() Future<String>
Gets the text from the editor and returns it as a String.
insertHtml(String html) → void
Insert HTML at the position of the cursor in the editor Note: This method should not be used for plaintext strings
Insert a link at the position of the cursor in the editor
insertNetworkImage(String url, {String filename = ''}) → void
Insert a network image at the position of the cursor in the editor
insertTable(String dimensions) → void
Internal function to insert table on Web
insertText(String text) → void
Insert text at the end of the current HTML content in the editor Note: This method should only be used for plaintext strings
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recalculateHeight() → void
Recalculates the height of the editor to remove any vertical scrolling. This method will not do anything if autoAdjustHeight is turned off.
redo() → void
Redoes the last action
reloadWeb() → void
Refresh the page
removeNotification() → void
Remove the current notification from the bottom of the editor
resetHeight() → void
Resets the height of the editor back to the original if it was changed to accommodate the keyboard. This should only be used on mobile, and only when adjustHeightForKeyboard is enabled.
setFocus() → void
Sets the focus to the editor.
setFullScreen() → void
Sets the editor to full-screen mode.
setHint(String text) → void
Sets the hint for the editor.
setText(String text) → void
Sets the text of the editor. Some pre-processing is applied to convert String elements like "\n" to HTML elements.
toggleCodeView() → void
toggles the codeview in the Html editor
toString() String
A string representation of this object.
inherited
undo() → void
Undoes the last action

Operators

operator ==(Object other) bool
The equality operator.
inherited