Skip to content

Variable: textAlign ​

ts
const textAlign: (options?) => Extension;

Text alignment on paragraphs and headings: an align attribute (null = left, 'center', 'right'), rendered as style="text-align: …". Shortcuts: Mod-Shift-l, Mod-Shift-e, Mod-Shift-r.

Parameters ​

ParameterType
options?TextAlignOptions

Returns ​

Extension

Example ​

ts
createEditor({ extensions: [...basic(), textAlign()], label: 'Text' })