Tiptapex.Renderer.Nodes (Tiptapex v0.1.0)

Copy Markdown View Source

Built-in node renderers for Tiptapex.Renderer.

Covers every node type the Tiptapex editor produces. Output shape (tags, classes, data attributes) deliberately mirrors what the Tiptap JS extensions render client-side, so server HTML and hydrated HTML look identical under the shipped stylesheet.

Summary

Functions

Renders one node. children is the already-rendered iodata of its content. Returns {:ok, iodata} or :unknown for unhandled types.

Functions

render(type, node, children, opts)

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

Renders one node. children is the already-rendered iodata of its content. Returns {:ok, iodata} or :unknown for unhandled types.