Block elements
Block elements define the structural layout of a document: quoted passages, preformatted code, visual dividers, and line breaks. All are included in StarterKit. Support varies across the pipeline.
What you need
- Extensions:
StarterKit(includesBlockquote,CodeBlock,HorizontalRule, andHardBreak) - Configuration: None required. Page breaks require a separate extension and are covered on their own page.
- Integration paths: Import and export work identically via both the editor extension and REST API.
Support overview
| Import | Editor | Export | |
|---|---|---|---|
| Blockquote | Supported | Supported (StarterKit) | Supported |
| Code block | Not supported | Supported (StarterKit) | Not supported (dropped) |
| Horizontal rule | Supported | Supported (StarterKit) | Supported |
| Hard break | Supported | Supported (StarterKit) | Supported |
| Page break | See Page breaks |
Blockquote
In Word, blockquotes are paragraphs with a "Quote" style (matched case-insensitively).
The import produces a blockquote node wrapping one or more paragraph children. Inline formatting inside the quote is preserved.
The export writes paragraphs with the "Quote" style back to DOCX. Blockquotes round-trip correctly.
Extension: Blockquote (StarterKit) | Shortcut: Cmd+Shift+B
Code block
The DOCX import does not map any Word style to codeBlock nodes. Code blocks are available in the editor via StarterKit but have no import or export support in the conversion pipeline.
Code blocks have no DOCX conversion support
Code blocks are neither imported from nor exported to DOCX. On export, codeBlock nodes are not converted. If your workflow requires round-tripping code blocks, register custom node handlers on both the import and export extensions.
Extension: CodeBlock (StarterKit) | Shortcut: Cmd+Alt+C
Horizontal rule
Horizontal rules in Word are typically VML shapes (v:rect with o:hr attributes, v:line elements). The import detects these and creates horizontalRule nodes.
The export produces valid Word horizontal rules using VML shapes. Horizontal rules round-trip correctly.
Extension: HorizontalRule (StarterKit) | Input rules: ---, ___, ***
Hard break
A hard break (Shift+Enter) creates a new line within the same paragraph. In Word this is a <w:br/> element. Hard breaks round-trip correctly.
Extension: HardBreak (StarterKit) | Shortcut: Shift+Enter
Page break
Page breaks have been moved to the Page breaks page under Page layout.
Export
| Element | DOCX output |
|---|---|
| Blockquote | Paragraphs with "Quote" style |
| Code block | Not exported |
| Horizontal rule | VML horizontal rule shape |
| Hard break | <w:br/> within a text run |
| Page break | See Page breaks |