āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/udecode/plate/(guides)/feature-kits ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
Feature Kits bundle related plugins and their UI components. They provide the fastest way to add editor features.
Feature Kits are pre-assembled packages. They include multiple plugins and components for specific editor features.
For example, BasicBlocksKit includes plugins for paragraphs, headings, blockquotes, and horizontal rules. It also includes their UI components.
Plugin documentation shows two approaches:
Kits are mostly the same as manual setup, but pre-configured.
Look for "Kit Usage" sections in plugin documentation. These sections show which kit to use and include the kit's source code.
The BasicBlocksKit includes these plugins and components:
ParagraphPlugin with ParagraphElementH1Plugin with H1ElementH2Plugin with H2ElementH3Plugin with H3ElementBlockquotePlugin with BlockquoteElementHorizontalRulePlugin with HrElementInstead of adding each plugin separately, use the kit:
import { createPlateEditor } from 'platejs/react';
import { BasicBlocksKit } from '@/components/editor/plugins/basic-blocks-kit';
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
...BasicBlocksKit,
],
});
This adds all block elements with their UI components.
Use manual setup when you need:
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā