Ritext
Extensions

Text Align

Align text left, center, right, or justify.

The TextAlign extension adds text alignment controls to the toolbar. It supports left, center, right, and justify alignments.

Import

import { TextAlign } from 'ritext/extension/textalign';

Usage

const extensions = [TextAlign];

Configuration

TextAlign.configure({
  surface: { bubbleMenu: true },
  order: { bubbleMenu: 8 },
})

Default Alignments

All four alignments are enabled by default: left, center, right, justify.

The extension applies to: heading, paragraph, list_item, title, image.

Options

Prop

Type

On this page