Structure
Why it’s essential
- Required root - Every editor needs exactly one document node
- Content validation - Ensures at least one block element exists
- Document operations - Enables document-level commands and queries
Commands
getDocumentStats
Get document statistics
Returns word count, character count, and paragraph count
clearDocument
Clear entire document
Replaces all content with an empty paragraph
setSectionPageMarginsAtSelection
Set page margins for the section at the current cursor position.
Example:
Object with optional
topInches, rightInches, bottomInches, leftInches (numbers in inches)
