prosekit/extensions/text-align
TextAlignOptions<NodeName>
Type Parameters
• NodeName extends string
= string
Properties
default?
optional
default:string
The default value for the attribute.
Default
ts
"left"
types
types:
NodeName
[]
The names of node to add the attribute to.
Example
ts
["paragraph", "heading"]
defineTextAlign()
defineTextAlign<
NodeName
>(options
):TextAlignExtension
<NodeName
>
Adds a textAlign
attribute to the specified nodes. This will be rendered as a CSS text-align
style.
Type Parameters
• NodeName extends string
= string
Parameters
• options: TextAlignOptions
<NodeName
>
Returns
TextAlignExtension
<NodeName
>