function

RenderHTML

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

Arguments

ArgumentTypeDescription
valuestore.ValueThe value value.
renderersmap[string]func(store.Values) (string, error)The renderers value.

Returns

The declared result.

(string, error)

How it works

Text and attributes are escaped and unsafe link schemes are rejected. Supply renderers for uploads, relationships, blocks, or any custom node presentation; application HTML remains outside storage.

Full signature

func RenderHTML( value store.Value, renderers map[string]func(store.Values) (string, error), ) (string, error)

Source plugins/richtext/richtext.go:443

Related types

  • Value

    An immutable scalar, object, list, or populated document value.

  • Values

    A map of field names to typed values.