mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 02:09:01 +08:00
1.7 KiB
1.7 KiB
Placeholder
This extension provides placeholder support. Give your users an idea what they should write with a tiny hint. There is a handful of things to customize, if you feel like it.
Installation
# with npm
npm install @tiptap/extension-placeholder
# with Yarn
yarn add @tiptap/extension-placeholder
Settings
Option | Type | Default | Description |
---|---|---|---|
emptyEditorClass | String |
'is-editor-empty' |
The added CSS class if the editor is empty. |
emptyNodeClass | String |
'is-empty' |
The added CSS class if the node is empty. |
placeholder | `String | Function` | 'Write something …' |
showOnlyWhenEditable | Boolean |
true |
Show decorations only when editor is editable. |
showOnlyCurrent | Boolean |
true |
Show decorations only in currently selected node. |
Source code
packages/extension-placeholder/