Skip to content

prosekit/extensions/text-align

TextAlignOptions

default?: string

The default value for the attribute.

Default: "left"

types: NodeName[]

The names of node to add the attribute to.

Example

ts
["paragraph", "heading"]

defineTextAlign

ts
function defineTextAlign<NodeName extends string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>

Adds a textAlign attribute to the specified nodes. This will be rendered as a CSS text-align style.