Skip to main content

Headings Plugin

Headings plugin enables users to set different headings type to their content

Highlight the text and set heading using text formatting toolbar

Usage#

/* Editor */
import { RicosEditor } from 'ricos-editor';
import { pluginHeadings } from 'wix-rich-content-plugin-headings';
<RicosEditor plugins={[pluginHeadings(HeadingsConfig)]} />;
/* Viewer */
import { RicosViewer } from 'ricos-viewer';
import { pluginHeadings } from 'wix-rich-content-plugin-headings/viewer';
<RicosViewer plugins={[pluginHeadings(HeadingsConfig)]} />;

Headings Config API#

customHeadings#

The types of headings that user can set

customHeadings?: HeadingType[];

Default value:

['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P'];

allowHeadingCustomization#

Enables\Disables in content heading customizations *only available with the new formatting toolbar

allowHeadingCustomization?: boolean;

Default value: false