Block elements

Beta

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 (includes Blockquote, CodeBlock, HorizontalRule, and HardBreak)
  • 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

ImportEditorExport
BlockquoteSupportedSupported (StarterKit)Supported
Code blockNot supportedSupported (StarterKit)Not supported (dropped)
Horizontal ruleSupportedSupported (StarterKit)Supported
Hard breakSupportedSupported (StarterKit)Supported
Page breakSee 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

ElementDOCX output
BlockquoteParagraphs with "Quote" style
Code blockNot exported
Horizontal ruleVML horizontal rule shape
Hard break<w:br/> within a text run
Page breakSee Page breaks