Sablon.HTMLConverter (sablon v0.4.3)

Copy Markdown View Source

Converts HTML into WordProcessingML.

There is no one-to-one mapping between the two, but a useful subset overlaps: paragraphs, headings, lists, tables, hyperlinks and inline formatting. Which tags are recognised and how CSS declarations translate into WordML properties is configurable, see Sablon.Configuration.

Summary

Functions

Builds the AST for input without post-processing it.

Converts an HTML fragment into WordML.

Builds the AST for input and applies the pre-render visitors.

Functions

build_ast(input, env)

Builds the AST for input without post-processing it.

process(input, env)

@spec process(binary(), Sablon.Environment.t()) :: binary()

Converts an HTML fragment into WordML.

processed_ast(input, env)

Builds the AST for input and applies the pre-render visitors.