āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/udecode/plate/(plugins)/(elements)/blockquote ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
title: Blockquote docs:
<blockquote> HTML element by default.The fastest way to add the blockquote plugin is with the BasicBlocksKit, which includes pre-configured BlockquotePlugin along with other basic block elements and their Plate UI components.
BlockquoteElement: Renders blockquote elements.Add the kit to your plugins:
import { createPlateEditor } from 'platejs/react';
import { BasicBlocksKit } from '@/components/editor/plugins/basic-blocks-kit';
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
...BasicBlocksKit,
],
});
</Steps>
npm install @platejs/basic-nodes
Include BlockquotePlugin in your Plate plugins array when creating the editor.
import { BlockquotePlugin } from '@platejs/basic-nodes/react';
import { createPlateEditor } from 'platejs/react';
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
BlockquotePlugin,
],
});
You can configure the BlockquotePlugin with options such as a specific rendering component or custom keyboard shortcuts.
import { BlockquotePlugin } from '@platejs/basic-nodes/react';
import { createPlateEditor } from 'platejs/react';
import { BlockquoteElement } from '@/components/ui/blockquote-node';
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
BlockquotePlugin.configure({
node: { component: BlockquoteElement },
shortcuts: { toggle: 'mod+shift+.' },
}),
],
});
node.component: Assigns BlockquoteElement to render blockquote elements.shortcuts.toggle: Defines a keyboard shortcut to toggle blockquote formatting.You can add blockquote to the Turn Into Toolbar Button to toggle blockquotes:
{
icon: <QuoteIcon />,
label: 'Quote',
value: KEYS.blockquote,
}
You can add blockquote to the Insert Toolbar Button to insert blockquotes:
{
icon: <QuoteIcon />,
label: 'Quote',
value: KEYS.blockquote,
}
</Steps>
BlockquotePluginPlugin for blockquote elements. Renders as <blockquote> HTML element by default.
tf.blockquote.toggleToggles the current block between blockquote and paragraph. If the block is already a blockquote, it reverts to a paragraph. If it's a paragraph or another block type, it converts to a blockquote.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā