Skip to Content
FeaturesText Formatting

Text Formatting

Available plugins

PluginExportShortcut
BoldboldPluginMod-b
ItalicitalicPluginMod-i
UnderlineunderlinePluginMod-u
StrikethroughstrikethroughPlugin
SuperscriptsuperscriptPluginMod-.
SubscriptsubscriptPluginMod-,
Text ColortextColorPlugin
HighlighthighlightPlugin
Inline CodeinlineCodePluginMod-`

Usage

import { availablePlugins } from "@inkstream/starter-kit" <RichTextEditor plugins={[ availablePlugins.paragraph, availablePlugins.bold, availablePlugins.italic, availablePlugins.underline, availablePlugins.strike, availablePlugins.superscript, availablePlugins.subscript, availablePlugins.textColor, availablePlugins.highlight, availablePlugins.code]} toolbarLayout={['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'code']} />

Text color

textColorPlugin renders a color picker dropdown in the toolbar. The color is stored as an inline style on a span mark.

<RichTextEditor plugins={[availablePlugins.textColor, availablePlugins.highlight]} toolbarLayout={['textColor', 'highlight']} pluginOptions={{ textColor: { colors: ['#000000', '#FF0000', '#0000FF', '#008000'], }, }} />