Text Style

The text style mark with color, background, font family, font size and line height controls.

UIrich-text-editor-text-styleView JSON

Each attribute item registers the text style mark it extends, so any one of them works on its own. Declaring the mark and an attribute together registers it once.

Preview

Installation

Add the item with the shadcn CLI, or copy the source manually.

pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-text-style

Requires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.

Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/rich-text-editor-text-style

Typography is provided by shadcn/typeset. Copy typeset.css next to your stylesheet, import it after Tailwind and add the .typeset-docs preset. See the Rich text editor setup.

API Reference

Props accepted by the exported components.

EditorTextStyle

Registers the text style mark that carries the other attributes.

This component accepts no custom props.

EditorColor

Adds the color attribute to the text style mark.

This component accepts no custom props.

EditorBackgroundColor

Adds the background color attribute to the text style mark.

This component accepts no custom props.

EditorFontFamily

Adds the font family attribute to the text style mark.

This component accepts no custom props.

EditorFontSize

Adds the font size attribute to the text style mark.

This component accepts no custom props.

EditorLineHeight

Adds the line height attribute to the text style mark.

This component accepts no custom props.

EditorTextStyleToolbar

Popover with the color, background, font family, font size and line height controls.

PropTypeDefault
classNamestring-