Subscript and superscript
Subscript and superscript marks import from DOCX and render in the editor, but are not preserved on export. Content like H₂O will import and display correctly but export as plain H2O.
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 | Not supported |
| Superscript | Supported | Supported via ConvertKit | Not 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
Neither the editor extension nor the REST API exports subscript or superscript marks.
Subscript and superscript are not exported
The DOCX export converter does not handle subscript or superscript marks. They are not converted during export. Content like H₂O will appear as plain H2O in the exported document. This affects chemical formulas, mathematical notation, footnote references, and any other use of sub/superscript text.
Subscript and superscript applied in the editor work correctly for display. The limitation only affects export to DOCX.
Subscript and superscript within math or LaTeX expressions follow a separate code path (using OOXML math elements m:sSub and m:sSup) and are not affected by this limitation.