convert abstract method

List<Operation> convert(
  1. Element element, {
  2. Map<String, dynamic>? currentAttributes,
})

Converts the HTML element into Delta operations.

Implement this method to convert the matched HTML element into a list of Delta operations.

Parameters:

  • element: The HTML element to convert.
  • currentAttributes: Optional. The current attributes to apply to the Delta operations.

Returns: A list of Delta operations representing the converted content of the HTML element.

Example:

class MyCustomBlock implements CustomHtmlPart {
  List<Operation> convert(dom.Element element, {Map<String, dynamic>? currentAttributes}) {
    // Conversion logic here
  }
}

Implementation

List<Operation> convert(dom.Element element,
    {Map<String, dynamic>? currentAttributes});