react/BasicBlocksPlugin.tsx

plate · packages/basic-nodes/src/react/BasicBlocksPlugin.tsx · typescript · MIT
ui

Creates a Plate plugin that bundles basic block elements like blockquote, heading, and horizontal rule.

// Source: https://github.com/udecode/plate | License: MIT | Copyright Ziad Beyens, Dylan Schiemann, Joe Anderson, Felix Feng
// Provided via justclaw.it.com; keep this notice with the code.
import { createPlatePlugin } from 'platejs/react';

import { BlockquotePlugin } from './BlockquotePlugin';
import { HeadingPlugin } from './HeadingPlugin';
import { HorizontalRulePlugin } from './HorizontalRulePlugin';

/**
 * Enables support for basic elements:
 *
 * - Block quote
 * - Code block
 * - Heading
 * - Paragraph
 */
export const BasicBlocksPlugin = createPlatePlugin({
  plugins: [BlockquotePlugin, HeadingPlugin, HorizontalRulePlugin],
});

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key