html_to_markdown library

High-performance HTML to Markdown converter for Dart and Flutter.

Powered by the Rust html-to-markdown library via FFI bindings.

The value types, the visitor contract, and the exception surface live in html_to_markdown_ffi_platform (the layer the federated adapters also depend on); this library keeps the consumer-facing import path and names.

Classes

ConversionOptions
ConversionResult
HtmlMetadata
Extracted HTML metadata from document head and body.
HtmNativeLibraries
Resolver seam (spec 064): a host can register a resolver that points at a prebuilt binary, so the preserved loading chain below can find it without the app package shipping binaries itself. Purely additive — the pre-migration resolution steps are unchanged and keep precedence as documented in NativeLibrary.
ImageMetadata
LinkMetadata
NativeLibrary
NodeContext
Context information passed to each visitor callback.
PreprocessingOptions
Preprocessing configuration for HTML cleanup before conversion.
ProcessingWarning
Visitor
Abstract visitor for intercepting HTML element processing.

Enums

CodeBlockStyle
Code block rendering style.
HeadingStyle
Supported heading styles.
HighlightStyle
Code highlighting style.
LinkStyle
Link rendering style.
ListIndentType
List indentation type.
NewlineStyle
Line ending style.
NodeType
HTML node type for visitor context.
OutputFormat
Output format for the converted Markdown.
PreprocessingPreset
Preprocessing preset for input normalization.
VisitResult
Result of a visitor callback. continue_ has underscore suffix because continue is a reserved keyword in Dart.
WarningKind
Processing warning category.
WhitespaceMode
Whitespace handling mode.

Constants

conversionError → const ConversionErrorException Function(String message, {int? errorCode})
Surfaces the preserved typed failure helper for callers that drive the bridge directly; re-exported here for import-path compatibility.

Properties

htmlToMarkdownFfi → HtmlToMarkdownFfiService
The service instance backing the top-level convert function: the datasource path (in-process native bridge). Federated consumers that register an adapter port get the adapter path transparently — see HtmlToMarkdownFfiService.
final
nativeConverterAvailable → bool
Whether the native bridge is loadable on this host right now.
no setter

Functions

checkLastError() → void
convert(String html, {ConversionOptions? options, Visitor? visitor}) → ConversionResult
convertAsync(String html, {ConversionOptions? options, Visitor? visitor}) → Future<ConversionResult>
Conversion through the stack without an adapter, surfaced asynchronously.

Typedefs

HtmNativeLibraryResolver = String? Function()
Returns the absolute path of a native library the resolver provides, or null when it does not apply to the running platform.