DefaultHtmlToOperations class

Default implementation of HtmlOperations for converting common HTML to Delta operations.

This class provides default implementations for converting common HTML elements like paragraphs, headers, lists, links, images, videos, code blocks, and blockquotes into Delta operations.

Inheritance

Constructors

DefaultHtmlToOperations()

Properties

customBlocks List<CustomHtmlPart>?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

blockquoteToOp(Element element) List<Operation>
Converts a blockquote HTML element (<blockquote>) to Delta operations.
override
brToOp(Element element) List<Operation>
Converts a <br> HTML element to Delta operations.
override
codeblockToOp(Element element) List<Operation>
Converts a code block HTML element (<pre>) to Delta operations.
override
divToOp(Element element) List<Operation>
Converts a div HTML element (<div>) to Delta operations.
override
headerToOp(Element element) List<Operation>
Converts a header HTML element (<h1> to <h6>) to Delta operations.
override
imgToOp(Element element) List<Operation>
Converts an image HTML element (<img>) to Delta operations.
override
linkToOp(Element element) List<Operation>
Converts a link HTML element (<a>) to Delta operations.
override
listToOp(Element element, [int indentLevel = 0]) List<Operation>
Converts list HTML elements (<ul>, <ol>, <li>) to Delta operations.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paragraphToOp(Element element) List<Operation>
Converts a paragraph HTML element (<p>) to Delta operations.
override
resolveCurrentElement(Element element, [int indentLevel = 0]) List<Operation>
Resolves the current HTML element into Delta operations.
inherited
setCustomBlocks(List<CustomHtmlPart> customBlocks, {bool overrideCurrentBlocks = false}) → void
Sets custom HTML parts to extend the conversion capabilities.
inherited
spanToOp(Element element) List<Operation>
Converts a span HTML element (<span>) to Delta operations.
override
toString() String
A string representation of this object.
inherited
videoToOp(Element element) List<Operation>
Converts a video HTML element (<video>) to Delta operations.
override

Operators

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