Documentation
¶
Overview ¶
Package richtext provides Ridu's official versioned rich-text field plugin.
Index ¶
- Constants
- func Field(name string, options ...field.PluginOption) field.Definition
- func FieldWithConfig(name string, config Config, options ...field.PluginOption) field.Definition
- func New() ridu.Plugin
- func RenderHTML(value store.Value, renderers map[string]func(store.Values) (string, error)) (string, error)
- type Config
- type Document
- type Feature
Constants ¶
View Source
const ( Key = "richtext" DocumentVersion = 1 AdminPluginPairingVersion = 1 )
Variables ¶
This section is empty.
Functions ¶
func Field ¶
func Field(name string, options ...field.PluginOption) field.Definition
Field constructs a rich-text field with Ridu's recommended authoring defaults.
func FieldWithConfig ¶
func FieldWithConfig(name string, config Config, options ...field.PluginOption) field.Definition
Types ¶
type Config ¶
type Config struct {
Features []Feature `json:"features"`
UploadCollections []string `json:"uploadCollections,omitempty"`
RelationshipCollections []string `json:"relationshipCollections,omitempty"`
}
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a defensive copy of Ridu's recommended authoring defaults.
type Document ¶
Document is the serialized Lexical document stored by the rich-text field. Node shapes remain extensible and are validated against the field's enabled feature configuration at runtime. Document is the exact generated Go value type for a versioned rich-text document.
Click to show internal directories.
Click to hide internal directories.