Last week, Tetsuaki Hamano contributed his first plugin to the official WordPress plugin repository. RichText Extension grants additional options for inline text in the block editor.
RichText is a component in the editor that allows end-users to add and edit text. Typically, users may think of this component when dealing with paragraphs. However, it also applies to headings, lists, quotes, image captions, and any other area where textual content can be added.
Many plugins add settings on the block level. This means when you apply a particular style, it applies to the entire block. Inline text refers to the individual characters and words within the block. By default, WordPress allows end-users to control inline text by adding links, creating italic or bold characters, changing the text color, and more. Superscript and subscript inline options have already landed in the Gutenberg plugin, which should ship with WordPress 5.5.
RichText Extension extends the editor toolbar to add new options for highlighting, underlining, and changing the font size of inline text. It also adds an option to clear all formatting.
Overall, the plugin is a solid outing for a first-time contributor to the plugin directory. With luck, we will get to see more of Hamano’s work in the future.
Plugin Features
The primary feature of RichText Extension is its highlighter option, which allows users to highlight text. The plugin adds a paintbrush icon to the toolbar. Once clicked, it opens four highlighting options. By default, users can add a red or yellow marker effect or background directly behind a piece of text. This feature can be useful for adding a bit of flair to make specific words or characters to stand out.
The plugin also adds a font size option to the toolbar. I am unsure how useful changing the font size for inline text is for the average end-user. Typically, this is best left to the block level. However, there may be some edge cases that others will want to use it for.
Along with the core editor’s inline options in the toolbar’s dropdown menu, RichText extension adds Clear Format and Underline options. The former allows users to clear all inline formatting. The latter underlines text.
Each of the plugin’s features can be configured via the plugin’s settings screen. Users can change the highlight colors, their thickness, and transparency. The four available font sizes can be adjusted. It also allows users to enable or disable each feature.
It would be nice to see the plugin’s highlighting and font-size features use the theme-defined color palette and font sizes, respectively. The plugin could further allow users to define custom colors and sizes outside of those added by the theme.
More than anything, I would like to see a fully-featured plugin tackle every conceivable inline text option with the ability to enable or disable each. This would give end-users ultimate flexibility over how they write their content. Perhaps RichText Extension can be that plugin in the future. Otherwise, another developer may step in and do the job.