HtmlEditorController class
Fallback controller (should never be used)
Constructors
- HtmlEditorController({bool processInputHtml = true, bool processNewLineAsBr = false, bool processOutputHtml = true})
Properties
- editorController → InAppWebViewController?
-
Allows the
InAppWebViewController
for the Html editor to be accessed outside of the package itself for endless control and customization.no setter - 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
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.
-
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
-
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
-
insertLink(
String text, String url, bool isNewWindow) → void - 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
-
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