type

Node

Node contains portable editor properties. Fields is present only for atomic block nodes and holds the field-specific generated payload union.

Properties

PropertyTypeDescription
TypestringThe Type value.
VersionintThe Version value.
Children[]Node[T]The Children value.
Fields*TThe Fields value.
TextstringThe Text value.
Formatjson.RawMessageThe Format value.
DetailintThe Detail value.
ModestringThe Mode value.
StylestringThe Style value.
TextFormatintThe TextFormat value.
TextStylestringThe TextStyle value.
Direction*stringThe Direction value.
IndentintThe Indent value.
TagstringThe Tag value.
URLstringThe URL value.
TargetstringThe Target value.
RelstringThe Rel value.
TitlestringThe Title value.
ListTypestringThe ListType value.
StartintThe Start value.
ValueintThe Value value.
Checked*boolThe Checked value.
LanguagestringThe Language value.
ThemestringThe Theme value.
RelationTostringThe RelationTo value.
IDstringThe ID value.
CaptionstringThe Caption value.

Full signature

type Node[T any] struct { Type string `json:"type"` Version int `json:"version,omitempty"` Children []Node[T] `json:"children,omitempty"` Fields *T `json:"fields,omitempty"` Text string `json:"text,omitempty"` Format json.RawMessage `json:"format,omitempty"` Detail int `json:"detail,omitempty"` Mode string `json:"mode,omitempty"` Style string `json:"style,omitempty"` TextFormat int `json:"textFormat,omitempty"` TextStyle string `json:"textStyle,omitempty"` Direction *string `json:"direction,omitempty"` Indent int `json:"indent,omitempty"` Tag string `json:"tag,omitempty"` URL string `json:"url,omitempty"` Target string `json:"target,omitempty"` Rel string `json:"rel,omitempty"` Title string `json:"title,omitempty"` ListType string `json:"listType,omitempty"` Start int `json:"start,omitempty"` Value int `json:"value,omitempty"` Checked *bool `json:"checked,omitempty"` Language string `json:"language,omitempty"` Theme string `json:"theme,omitempty"` RelationTo string `json:"relationTo,omitempty"` ID string `json:"id,omitempty"` Caption string `json:"caption,omitempty"` }

Source plugins/richtext/document.go:22

Methods

  • Node.MarshalJSON()

    Public method Node.MarshalJSON from github.com/riducms/ridu/plugins/richtext.

  • Node.UnmarshalJSON()

    Public method Node.UnmarshalJSON from github.com/riducms/ridu/plugins/richtext.