Skip to main content

Custom Font Size

Font Size enables inline customization of the font size

Highlight anywhere in the text and set the font size !

Usage#

Adding the font size dropdown component is as simple as adding a button to the new formatting toolbar, however its not added by default.
To add the button pass FORMATTING_BUTTONS.FONT_SIZE to the array of desktop buttons, note that its only available on desktop.

import { RicosEditor } from 'ricos-editor';
import { FORMATTING_BUTTONS, TOOLBARS } from 'wix-rich-content-editor-common';
<RicosEditor
ToolbarSettings={{
getToolbarSettings: ({ textButtons }) => [
{
name: TOOLBARS.INLINE,
getButtons: () => ({
desktop: [FORMATTING_BUTTONS.FONT_SIZE],
}),
},
],
}}
/>;