type
Document
The exact generated Go value type for a versioned serialized Lexical document.
Properties
| Property | Type | Description |
|---|---|---|
Version | int | The Version value. |
Root | Node[T] | The Root value. |
How it works
Runtime validation requires version 1, a root object, enabled node types, valid references, and bounded complexity (at most 64 levels and 10,000 nodes). Node shapes remain extensible for custom renderer data.
Full signature
Methods
Document.MarshalJSON()Public method Document.MarshalJSON from github.com/riducms/ridu/plugins/richtext.
Document.UnmarshalJSON()UnmarshalJSON rejects unsupported documents rather than dropping historical content while decoding. Export/migration tools should retain raw JSON when a typed decoder returns an error.