Skip to main content

As a developer, there are times when WYSIWYG editors provide functionality that, when used incorrectly, can hinder the goal of a unified brand and cause content design and flow issues. The Rich Text Editor inside of custom modules now provides the ability for developers to remove components from the configuration toolbar through the enabled_features property inside of the fields.json file.

In your fields.json file where you have your rich text field object, you can enable certain features by adding the valid toolbar options in an array to the enabled_features property as illustrated below:

The content editor would then see the rich text editor with only the included options enabled as illustrated in the image below:

An example of a RTE toolbar with enabled features.

Below is a list of features which can be enabled individually when using the enabled_features property.

OptionDescription
colorsText color and background color controls.
fontsFont family and font size controls.
indentsOutdent and indent controls.
listsBulleted and numbered lists controls.
standard_emphasisBold, italic, and underline controls.
advanced_emphasisStrikethrough, superscript, subscript, and code format controls.
glyphsEmoji, special character, and icon controls. Not supported in email modules. To add the emoji picker to email modules, use emoji instead.
OptionDescription
blockShows the style switcher dropdown menu.
font_familyShows the font switcher dropdown menu.
font_sizeShows the font size dropdown menu.
boldShows the bold button.
italicShows the italics button.
underlineShows the underline button.
text_colorShows the text color button.
background_colorShows the background color button.
alignmentShows the alignment button.
bulleted_listShows the bulleted list button.
numbered_listShows the numbered lists button.
lineheightShows the line-height button.
outdentShows the outdent button.
indentShows the indent button.
strikethroughShows the strikethrough button.
superscriptShows the superscript button.
subscriptShows the subscript button.
code_formatShows the code format button.
OptionDescription
linkShows the link button.
imageShows the image button. Not supported in email modules.
emojiShows the emoji button.
personalizeShows the personalize toolbar item.
ctaShows the call-to-action menu item under the insert menu.
embedShows the embed menu item under the insert menu.
videoShows the video menu item under the insert menu.
tableShows the table menu item under the insert menu.
charmapShows the special character menu item under the insert menu.
anchorShows the anchor menu item under the insert menu.
hrShows the horizontal line menu item under the insert menu.
nonbreaking_spaceShows the non-breaking space menu item under the insert menu.
iconShows the icon menu item under the insert menu.
OptionDescription
source_codeShows the source code menu item under the advanced menu.
visual_blocksShows the show blocks menu item under the advanced menu.