Module

richtext

github.com/riducms/ridu/plugins/richtext — A paired, versioned Lexical field with authoring for portable content, references, uploads, and blocks.

Functions 6

  • richtext.New()

    Register the backend half of the paired rich-text plugin.

  • richtext.Field()

    Field constructs a rich-text field with optional configuration. With no Config, it uses the recommended defaults. A supplied Config with omitted Features also inherits those defaults; an explicitly empty Features slice disables them. Embedded block fields retain their attached behavior and presentation. Field panics if more than one Config is supplied.

  • richtext.DefaultConfig()

    Return a defensive copy of the recommended feature configuration.

  • richtext.RenderHTML()

    Render portable nodes to escaped HTML, delegating custom node types to caller-owned renderers.

  • richtext.MapDocumentBlocks()

    MapDocumentBlocks copies the editor tree while explicitly converting each typed block payload. Pass the generated output payload's Retain method to make an update document: only block identities are retained, so omitted, redacted, localized and populated fields are never copied into a write. Edit returned update payloads and save with the parent document's revision.

  • richtext.RenderDocument()

    RenderDocument renders a typed document without loading an editor or fetching referenced records. The block callback receives the generated payload codec; applications dispatch its Value union by concrete generated type. Missing callbacks fail explicitly. Use RenderHTML for deliberate raw recovery tooling.

Types 9

Constants 7

Methods 4