type
Node
Node contains portable editor properties. Fields is present only for atomic block nodes and holds the field-specific generated payload union.
Properties
| Property | Type | Description |
|---|---|---|
Type | string | The Type value. |
Version | int | The Version value. |
Children | []Node[T] | The Children value. |
Fields | *T | The Fields value. |
Text | string | The Text value. |
Format | json.RawMessage | The Format value. |
Detail | int | The Detail value. |
Mode | string | The Mode value. |
Style | string | The Style value. |
TextFormat | int | The TextFormat value. |
TextStyle | string | The TextStyle value. |
Direction | *string | The Direction value. |
Indent | int | The Indent value. |
Tag | string | The Tag value. |
URL | string | The URL value. |
Target | string | The Target value. |
Rel | string | The Rel value. |
Title | string | The Title value. |
ListType | string | The ListType value. |
Start | int | The Start value. |
Value | int | The Value value. |
Checked | *bool | The Checked value. |
Language | string | The Language value. |
Theme | string | The Theme value. |
RelationTo | string | The RelationTo value. |
ID | string | The ID value. |
Caption | string | The 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"`
}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.