Overview
YooptaContentValue is the primary data structure that represents the complete content of a Yoopta Editor instance. It’s a record where each key is a unique block ID and each value is a YooptaBlockData object.
Type Definition
Structure
The content value is organized as a flat object structure, where:- Keys: Unique block identifiers (typically UUIDs)
- Values: Block data objects containing the block’s content and metadata
Properties
Each key represents a unique block ID, with its corresponding block data as the value. See YooptaBlockData for the complete structure.
Example
Usage
Getting Editor Content
Setting Editor Content
Iterating Over Blocks
Serialization
The content value can be serialized to various formats:Working with onChange
Block Order
WhileYooptaContentValue is a flat object structure, block ordering is maintained through the meta.order property of each block:
Type Safety
Related Types
- YooptaBlockData - Structure of individual blocks
- SlateElement - Structure of elements within blocks
- YooptaBlockBaseMeta - Block metadata structure
See Also
- Editor Methods - Methods for working with editor content
- Blocks API - Block-level operations
- Serialization - Converting content to different formats