Specification of a single node type.
Fields:
:name— the node name, an atom:content— parsed content expression,nilfor a leaf node:content_source— the original expression, kept for JSON export:group— group names this node belongs to:marks—:all, or the list of mark names allowed on its children:attrs— map of attribute name toCoelho.Schema.Attr:inline— whether the node is inline rather than block:text— set only on the built-intextnode:void— rendered as a self-closing tag, without children:class— a CSS class merged into the rendered element and exported to the browser, so the editor shows the class the public page will use:editor_attrs— extra DOM attributes for the editor only, exported with the schema and never emitted server side:render— how the node is turned into HTML, seeCoelho.Render:to_text— what the node contributes to the plain text extraction, when that is not simply its children:parse— HTML this node is imported from, seeCoelho.HTML
Summary
Types
@type t() :: %Coelho.Schema.NodeSpec{ attrs: %{optional(atom()) => Coelho.Schema.Attr.t()}, class: String.t() | nil, content: Coelho.Schema.ContentExpression.ast() | nil, content_source: String.t() | nil, editor_attrs: %{optional(String.t()) => String.t()}, group: [atom()], inline: boolean(), marks: :all | [atom()], name: atom(), parse: [Coelho.HTML.rule()], render: render(), text: boolean(), to_text: String.t() | (map() -> iodata()) | nil, void: boolean() }