content/(plugins)/(marks)/basic-marks.mdx
The BasicMarksKit bundles plugins for Bold, Italic, Underline, Strikethrough, Code, Subscript, Superscript, Highlight, and Kbd marks, along with their respective UI components from Plate UI. It also registers the shipped markdown input rules for those mark families.
CodeLeaf: Renders inline code elements.HighlightLeaf: Renders highlighted text elements.KbdLeaf: Renders keyboard shortcut elements.Add the kit to your plugins:
import { createPlateEditor } from 'platejs/react';
import { BasicMarksKit } from '@/components/editor/plugins/basic-marks-kit';
const editor = createPlateEditor({
plugins: [
// ...otherPlugins,
...BasicMarksKit,
],
});
The kit enables the common mark shortcuts out of the box, including:
**bold** / __bold__*italic* / _italic_`code`~~strike~~~sub~^sup^==highlight==See the Plugin Input Rules guide for the runtime model and the exact rule families.
npm install @platejs/basic-nodes
You can add MarkToolbarButton to your Toolbar to control text formatting marks.
For individual plugin setup and configuration, see the specific plugin documentation pages linked above.