Basic Marks
Set of essential text formatting options.
🌳 Blocks
Create blockquotes to emphasize important information or highlight quotes from external sources.
// Use code blocks to showcase code snippetsfunction greet() { console.info('Hello World!');}🌱 Marks
code formatting for easy readability.Plugins:
createBoldPlugin()forboldmarkcreateItalicPlugin()foritalicmarkcreateUnderlinePlugin()forunderlinemarkcreateStrikethroughPlugin()forstrikethroughmarkcreateSubscriptPlugin()forsubscriptmarkcreateSuperscriptPlugin()forsuperscriptmarkcreateCodePlugin()forcodemark
Installation
npm install @udecode/plate-basic-marksUsage
import { createBasicMarksPlugin } from '@udecode/plate-basic-marks';
const plugins = [
// ...otherPlugins,
createBasicMarksPlugin(),
];Keyboard Interactions
| Key | Description |
|---|---|
| Cmd + B | Toggle the bold formatting for the selected text. |
| Cmd + I | Toggle the italic formatting for the selected text. |
| Cmd + U | Toggle the underline formatting for the selected text. |
| Cmd + E | Toggle the code formatting for the selected text. |
| Cmd + Shift + X | Toggle the strikethrough formatting for the selected text. |
| Cmd + , | Toggle the subscript formatting for the selected text. |
| Cmd + . | Toggle the superscript formatting for the selected text. |
API
createBasicMarksPlugin
createBoldPlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createCodePlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createItalicPlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createUnderlinePlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createStrikethroughPlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createSubscriptPlugin
Options
Node properties to delete.
Hotkey to toggle mark.
createSuperscriptPlugin
Options
Node properties to delete.
Hotkey to toggle mark.