prosekit/extensions/text-align
TextAlignOptions
default
The default value for the attribute.
Type:
string
Default:
"left"
types
The names of node to add the attribute to.
Type:
NodeName[]
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.