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(),
];API
createBasicMarksPlugin
createBoldPlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createCodePlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createItalicPlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createUnderlinePlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createStrikethroughPlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createSubscriptPlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
createSuperscriptPlugin
Attributes
Node properties to delete.
Hotkey to toggle mark.
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. |