mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-19 14:53:00 +08:00
1.6 KiB
1.6 KiB
Paragraph
Yes, the schema is very strict. Without this extension you won’t even be able to use paragraphs in the editor.
:::warning Breaking Change from 1.x → 2.x
tiptap 1 tried to hide that node from you, but it has always been there. You have to explicitly import it from now on (or use StarterKit
).
:::
Installation
# with npm
npm install @tiptap/extension-paragraph
# with Yarn
yarn add @tiptap/extension-paragraph
Settings
HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
Paragraph.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
Commands
Command | Parameters | Description |
---|---|---|
paragraph | — | Transforms all selected nodes to paragraphs. |
Keyboard shortcuts
Command | Windows/Linux | macOS |
---|---|---|
setParagraph() | Control Alt 0 |
Cmd Alt 0 |