Docs
Font
Font
Provide extended formatting options for document content.
Add multiple font and background colors to create vibrant and eye-catching text.
Features
- Font size, family, color, background color, and weight.
Plugins:
fontFamily
: Change font family using inline elements with afont-family
in the style attribute.fontSize
: Control font size with inline elements having a CSS class or afont-size
in the style attribute.fontColor
: Control font color with inline elements having acolor
in the style attribute.fontBackgroundColor
: Control font background color with inline elements having abackground-color
in the style attribute.fontWeight
: Control font weight with inline elements having afont-weight
in the style attribute.
Installation
npm install @udecode/plate-font
Usage
import {
createFontBackgroundColorPlugin,
createFontColorPlugin,
createFontSizePlugin,
} from '@udecode/plate-font';
const plugins = [
// ...otherPlugins,
createFontColorPlugin(),
createFontBackgroundColorPlugin(),
createFontSizePlugin(),
];