DocxParser class

Parses HTML content into DocxNode elements.

This is the main entry point for HTML parsing. It uses a modular architecture with separate parsers for different element types:

  • HtmlBlockParser - Paragraphs, headings, code blocks
  • HtmlInlineParser - Text runs, links, formatting
  • HtmlTableParser - Tables
  • HtmlListParser - Lists
  • HtmlImageParser - Images

HTML Parsing

final elements = await DocxParser.fromHtml('<p>Hello <b>World</b></p>');

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromHtml(String html) Future<List<DocxNode>>
Parses HTML string into DocxNode elements with async image fetching.
fromMarkdown(String markdown) Future<List<DocxNode>>
Parses Markdown string into DocxNode elements.