Skip to main content

Module extensions

Module extensions 

Source
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.
BibliographyEntry
A bibliography entry representing a single reference.
ChangeTracking
Change tracking for a document.
CheckboxField
Boolean checkbox field.
Citation
An inline citation reference.
CollaborationSession
A collaborative editing session.
Collaborator
Collaborator information for comments and changes.
Comment
A comment or annotation on document content.
CommentThread
A collection of comments organized by thread.
Condition
A condition that references another field’s value.
ConditionOperator
The comparison operator for a conditional validation.
ConditionalAction
The action to apply when a condition is met.
ConditionalValidation
Conditional validation that applies rules based on another field’s value.
CrdtMetadata
CRDT metadata for a content block.
CursorPosition
Cursor position in the document.
DatePickerField
Date/time picker field.
DropdownField
Dropdown selection field.
DropdownOption
Dropdown option.
EntityLink
A link to an external entity in a knowledge base.
ExtensionBlock
An extension block for unsupported or unknown block types.
Footnote
A footnote with content blocks.
FormData
Form data submitted by users.
FormValidation
Form validation configuration.
Glossary
A glossary containing term definitions.
GlossaryRef
A reference to a glossary term in the document.
GlossaryTerm
A glossary term definition.
JsonLdMetadata
JSON-LD metadata for semantic web integration.
MaterializationEvent
Materialization event for CRDT documents.
PartialDate
A partial date (year, year-month, or full date).
Participant
A participant in a collaboration session.
Peer
A collaboration peer.
RadioGroupField
Radio button group for single selection.
RadioOption
Radio button option.
Revision
A single revision in the document history.
RevisionHistory
Revision history for tracking document evolution.
Selection
A text selection in the document.
SignatureField
Digital signature capture field.
SyncState
Synchronization state for CRDT-based collaboration.
TextAreaField
Multi-line text area field.
TextCrdtMetadata
CRDT metadata for text content within a block.
TextCrdtPosition
A single character position in text CRDT.
TextInputField
Single-line text input field.
TextRange
A text range within a block.
TrackedChange
A tracked change in the document.

Enums§

ChangeStatus
Status of a tracked change.
ChangeType
Type of tracked change.
CitationStyle
Citation style for formatting references.
CommentType
Type of comment or annotation.
CrdtFormat
CRDT format identifier.
EntityType
Type of entity being linked.
EntryType
Type of bibliography entry.
FormField
A form field that can appear in a Codex document.
HighlightColor
Highlight color.
KnowledgeBase
Known knowledge bases for entity linking.
LocatorType
Type of locator within a reference.
MaterializationReason
Reason for materializing CRDT state.
Priority
Priority level for comments.
SessionStatus
Status of a collaboration session.
SuggestionStatus
Status of a suggestion.
ValidationRule
A validation rule for form fields.