mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-16 11:49:02 +08:00
1.7 KiB
1.7 KiB
description | icon |
---|---|
Quoting other people lets you look clever. | double-quotes-l |
Blockquote
The Blockquote extension enables you to use the <blockquote>
HTML tag in the editor. This is great to … show quotes in the editor, you know?
Type >
at the beginning of a new line and it will magically transform to a blockquote.
Installation
# with npm
npm install @tiptap/extension-blockquote
# with Yarn
yarn add @tiptap/extension-blockquote
Settings
HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
Blockquote.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
Commands
setBlockquote()
Wrap content in a blockquote.
editor.commands.setBlockquote()
toggleBlockquote()
Wrap or unwrap a blockquote.
editor.commands.toggleBlockquote()
unsetBlockquote()
Unwrap a blockquote.
editor.commands.unsetBlockquote()
Keyboard shortcuts
Command | Windows/Linux | macOS |
---|---|---|
Toggle Blockquote | Control Shift B |
Cmd Shift B |
Source code
packages/extension-blockquote/