Expand description
Extension framework for Codex documents.
Extensions allow Codex documents to include specialized content types beyond the core block types. Each extension is namespaced (e.g., “forms”, “semantic”, “collaboration”) and provides custom block types.
§Graceful Degradation
When a reader encounters an unknown extension, it preserves the raw
data as an ExtensionBlock and can optionally render fallback content.
§Example
{
"type": "forms:textInput",
"id": "name-field",
"label": "Full Name",
"required": true,
"fallback": {
"type": "paragraph",
"children": [{"value": "[Form field: Full Name]"}]
}
}Re-exports§
pub use phantom::ConnectionStyle;pub use phantom::Phantom;pub use phantom::PhantomCluster;pub use phantom::PhantomClusters;pub use phantom::PhantomConnection;pub use phantom::PhantomContent;pub use phantom::PhantomPosition;pub use phantom::PhantomScope;pub use phantom::PhantomSize;
Modules§
- academic
- Academic extension for Codex documents.
- legal
- Legal extension for Codex documents.
- namespaces
- Known extension namespaces.
- phantom
- Phantom extension for off-page annotation clusters.
Structs§
- Author
- An author or contributor.
- Bibliography
- A bibliography containing all references cited in a document.
- Bibliography
Entry - A bibliography entry representing a single reference.
- Change
Tracking - Change tracking for a document.
- Checkbox
Field - Boolean checkbox field.
- Citation
- An inline citation reference.
- Collaboration
Session - A collaborative editing session.
- Collaborator
- Collaborator information for comments and changes.
- Comment
- A comment or annotation on document content.
- Comment
Thread - A collection of comments organized by thread.
- Condition
- A condition that references another field’s value.
- Condition
Operator - The comparison operator for a conditional validation.
- Conditional
Action - The action to apply when a condition is met.
- Conditional
Validation - Conditional validation that applies rules based on another field’s value.
- Crdt
Metadata - CRDT metadata for a content block.
- Cursor
Position - Cursor position in the document.
- Date
Picker Field - Date/time picker field.
- Dropdown
Field - Dropdown selection field.
- Dropdown
Option - Dropdown option.
- Entity
Link - A link to an external entity in a knowledge base.
- Extension
Block - An extension block for unsupported or unknown block types.
- Footnote
- A footnote with content blocks.
- Form
Data - Form data submitted by users.
- Form
Validation - Form validation configuration.
- Glossary
- A glossary containing term definitions.
- Glossary
Ref - A reference to a glossary term in the document.
- Glossary
Term - A glossary term definition.
- Json
LdMetadata - JSON-LD metadata for semantic web integration.
- Materialization
Event - Materialization event for CRDT documents.
- Partial
Date - A partial date (year, year-month, or full date).
- Participant
- A participant in a collaboration session.
- Peer
- A collaboration peer.
- Radio
Group Field - Radio button group for single selection.
- Radio
Option - Radio button option.
- Revision
- A single revision in the document history.
- Revision
History - Revision history for tracking document evolution.
- Selection
- A text selection in the document.
- Signature
Field - Digital signature capture field.
- Sync
State - Synchronization state for CRDT-based collaboration.
- Text
Area Field - Multi-line text area field.
- Text
Crdt Metadata - CRDT metadata for text content within a block.
- Text
Crdt Position - A single character position in text CRDT.
- Text
Input Field - Single-line text input field.
- Text
Range - A text range within a block.
- Tracked
Change - A tracked change in the document.
Enums§
- Change
Status - Status of a tracked change.
- Change
Type - Type of tracked change.
- Citation
Style - Citation style for formatting references.
- Comment
Type - Type of comment or annotation.
- Crdt
Format - CRDT format identifier.
- Entity
Type - Type of entity being linked.
- Entry
Type - Type of bibliography entry.
- Form
Field - A form field that can appear in a Codex document.
- Highlight
Color - Highlight color.
- Knowledge
Base - Known knowledge bases for entity linking.
- Locator
Type - Type of locator within a reference.
- Materialization
Reason - Reason for materializing CRDT state.
- Priority
- Priority level for comments.
- Session
Status - Status of a collaboration session.
- Suggestion
Status - Status of a suggestion.
- Validation
Rule - A validation rule for form fields.