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
constant richtext.KeyThe stable backend and plugin-field key.
constant richtext.DocumentVersionThe stored rich-text document format version.
constant richtext.AdminPluginPairingVersionThe required compatibility version between Go and Svelte packages.
type richtext.ConfigChoose a rich-text field's editing tools, allowed collections, blocks, and admin presentation.
type richtext.FeatureOne optional authoring and validation capability.
type richtext.DocumentThe exact generated Go value type for a versioned serialized Lexical document.
type richtext.AdminChange how a rich-text editor looks in the admin without changing what it stores.
type richtext.Feature constantsPublic type Feature constants from github.com/riducms/ridu/plugins/richtext.
type richtext.NodeNode contains portable editor properties. Fields is present only for atomic block nodes and holds the field-specific generated payload union.
Constants 7
constant richtext.FeatureBlocksPublic constant FeatureBlocks from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureCodePublic constant FeatureCode from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureHorizontalRulePublic constant FeatureHorizontalRule from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureLinksPublic constant FeatureLinks from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureListsPublic constant FeatureLists from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureRelationshipsPublic constant FeatureRelationships from github.com/riducms/ridu/plugins/richtext.
constant richtext.FeatureUploadsPublic constant FeatureUploads from github.com/riducms/ridu/plugins/richtext.