Tiptapex.Renderer.Marks (Tiptapex v0.1.2)

Copy Markdown View Source

Built-in mark renderers for Tiptapex.Renderer.

Marks wrap a text node's escaped content in nested inline tags. Nesting order is deterministic (link outermost … bold innermost) so identical documents always produce identical HTML.

Summary

Functions

Nesting order, outermost first.

Wraps children in one mark. Returns {:ok, iodata} or :unknown.

Functions

order()

Nesting order, outermost first.

render(type, mark, children, opts)

@spec render(binary(), map(), iodata(), map()) :: {:ok, iodata()} | :unknown

Wraps children in one mark. Returns {:ok, iodata} or :unknown.

A mark whose attributes fail sanitization degrades gracefully: the tag is emitted without the offending attribute (or, for textStyle with no valid styles left, the children pass through unwrapped).