Search

FontColor

VersionDownloads

This extension enables you to set the font color in the editor. It uses the TextStyle mark, which renders a <span> tag (and only that). The font color is applied as inline style then, for example <span style="color: #958DF1">.

Installation

# with npm
npm install @tiptap/extension-text-style @tiptap/extension-font-color

# with Yarn
yarn add @tiptap/extension-text-style @tiptap/extension-font-color

This extension requires the TextStyle mark.

Settings

OptionTypeDefaultDescription
typesArray['textStyle']A list of marks to which the font family attribute should be applied to.

Commands

CommandParametersDescription
fontColorfontColorApplies the given font color as inline style

Source code

packages/extension-font-color/

Usage