Skip to content
GitHubDiscord

prosekit/extensions/text-align

Type Parameter Default type

NodeName extends string

string

default?: string

The default value for the attribute.

"left"

types: NodeName[]

The names of node to add the attribute to.

["paragraph", "heading"]

function defineTextAlign<NodeName>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>

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