The values that can be inserted into a template.
Every content type knows how to render itself into the document at the
position of a merge field. Types are registered in Sablon.Registry and can
be extended by implementing this behaviour.
Summary
Callbacks
Renders the content into paragraph, replacing display_node (the w:t
element of the merge field).
Builds the content struct from the user supplied arguments.
The identifier used by Sablon.content/2, e.g. :word_ml.
Whether this type should be used to wrap a bare, unwrapped value.
Functions
Renders content at the position of display_node.
Builds a content value of the given type.
Registers a content type module.
Removes a content type, by id or by module.
Wraps a plain value in the content type that claims it.
Callbacks
@callback append_to( struct(), Sablon.XML.Node.t(), Sablon.XML.Node.t(), Sablon.Environment.t() ) :: any()
Renders the content into paragraph, replacing display_node (the w:t
element of the merge field).
Builds the content struct from the user supplied arguments.
@callback id() :: atom()
The identifier used by Sablon.content/2, e.g. :word_ml.
Whether this type should be used to wrap a bare, unwrapped value.
Functions
@spec append_to( struct(), Sablon.XML.Node.t(), Sablon.XML.Node.t(), Sablon.Environment.t() ) :: any()
Renders content at the position of display_node.
Builds a content value of the given type.
@spec register(module()) :: :ok
Registers a content type module.
Removes a content type, by id or by module.
Wraps a plain value in the content type that claims it.
Content structs are returned unchanged.