Subscript and superscript
Subscript and superscript marks round-trip between DOCX and Tiptap. Content like H₂O imports, renders in the editor, and exports back to DOCX with formatting preserved.
What you need
- Extensions: ConvertKit —
SubscriptandSuperscriptare bundled and enabled by default. - Configuration: None required beyond registering ConvertKit.
Support overview
| Import | Editor | Export | |
|---|---|---|---|
| Subscript | Supported | Supported via ConvertKit | Supported |
| Superscript | Supported | Supported via ConvertKit | Supported |
Import
Import subscript and superscript using the editor extension or the REST API. Both produce identical output.
The conversion service reads <w:vertAlign> run properties and produces the corresponding marks:
| Word element | Tiptap mark |
|---|---|
<w:vertAlign val="subscript"> | subscript |
<w:vertAlign val="superscript"> | superscript |
Chemical formulas (H₂O, CO₂), mathematical notation (x², E=mc²), and footnote references all import correctly.
Editor rendering
ConvertKit bundles both Subscript and Superscript and enables them by default — no separate install required.
import { ConvertKit } from '@tiptap-pro/extension-convert-kit'
const editor = new Editor({
extensions: [ConvertKit],
})Subscript renders as <sub>, superscript renders as <sup>. Keyboard shortcuts: Cmd+, for subscript, Cmd+. for superscript.
If you don't want one of them, disable it through ConvertKit's configuration:
ConvertKit.configure({
subscript: false, // disable subscript
superscript: false, // disable superscript
})Disabling either one drops imported marks
When you set subscript: false or superscript: false, marks of that type from imported DOCX
will not be recognised by the editor schema. See the
invalid schema guide for how to manage unrecognised marks.
Export
Both the editor extension and the REST API export subscript and superscript marks back to DOCX run properties:
| Tiptap mark | Word element |
|---|---|
subscript | <w:vertAlign val="subscript"> |
superscript | <w:vertAlign val="superscript"> |
Chemical formulas (H₂O, CO₂), mathematical notation (x², E=mc²), and footnote references all round-trip without loss.
Subscript and superscript within math or LaTeX expressions follow a separate code path (using OOXML math elements m:sSub and m:sSup).