blockquoteToOp method

  1. @override
List<Operation> blockquoteToOp(
  1. Element element
)
override

Converts a blockquote HTML element (<blockquote>) to Delta operations.

Implementation

@override
List<Operation> blockquoteToOp(dom.Element element) {
  final Delta delta = Delta();
  Map<String, dynamic> blockAttributes = {'blockquote': true};

  for (final node in element.nodes) {
    processNode(node, {}, delta);
  }

  delta.insert('\n', blockAttributes);

  return delta.toList();
}