Skip to content

prosekit/extensions/placeholder

PlaceholderOptions

Properties

placeholder

placeholder: string

The placeholder text to use.

strategy?

optional strategy: "doc" | "block"

By default, the placeholder text will be shown whenever the current text cursor is in an empty text node. If you only want to show the placeholder when the whole doc is empty, you can set this option to 'doc'.

Default
ts
'block'

definePlaceholder()

definePlaceholder(options): PlainExtension

Add a placeholder text to the editor when the current block or document is empty.

Parameters

options: PlaceholderOptions

Returns

PlainExtension