Sablon.HTMLConverter.NodeProperties (sablon v0.4.3)

Copy Markdown View Source

The WordML property tag of an AST node, e.g. w:pPr for a paragraph.

Each kind of node accepts a fixed set of properties; anything else is "transferred", i.e. handed down to the children, which is how a style set on a div still reaches the runs inside it.

Summary

Functions

A compact key=value;key rendering, used in inspect output.

Reads a single property.

Builds a property set, splitting properties along whitelist.

Builds the w:pPr properties of a paragraph.

Sets a single property.

Builds the w:rPr properties of a run.

Builds the w:tblPr properties of a table.

Builds the w:tcPr properties of a table cell.

Builds the w:trPr properties of a table row.

Serialises the properties, returning nil when there are none.

Types

t()

@type t() :: %Sablon.HTMLConverter.NodeProperties{
  properties: Sablon.Props.t(),
  tagname: binary(),
  transferred_properties: Sablon.Props.t()
}

Functions

describe(arg1)

@spec describe(t() | nil) :: binary()

A compact key=value;key rendering, used in inspect output.

get(node_properties, key)

@spec get(t(), atom() | binary()) :: term()

Reads a single property.

new(tagname, properties, whitelist)

@spec new(binary(), Sablon.Props.t(), [binary()]) :: t()

Builds a property set, splitting properties along whitelist.

paragraph(properties)

Builds the w:pPr properties of a paragraph.

put(node_properties, key, value)

@spec put(t(), atom() | binary(), term()) :: t()

Sets a single property.

run(properties)

Builds the w:rPr properties of a run.

table(properties)

Builds the w:tblPr properties of a table.

table_cell(properties)

Builds the w:tcPr properties of a table cell.

table_row(properties)

Builds the w:trPr properties of a table row.

to_docx(arg1)

@spec to_docx(t() | nil) :: binary() | nil

Serialises the properties, returning nil when there are none.