Skip to main content
Version: v11.5.0

Adding Custom Fonts to Richtext Editor

In this document, learn how to add custom fonts to the Richtext Editor.

Adding Custom Fonts

To add custom fonts to the Richtext Editor, modify the defaultOptions property of the widget and add desired font names to the list. For that, you must add the function inside the onBeforeRender() event before the widgets are loaded.


Follow the steps below to achieve this.

  1. Add the below snippet inside the onBeforeRender() event of the Richtext Editor widget.

    • The snippet adds Inter font to the fontNames array.
Page.<richTextEditor>Beforerender = function($event, widget) {
var defaultOptions = widget.getDefaultOptions();
defaultOptions.fontNamesIgnoreCheck = ["Inter"]; // ignore checks for the font

We have included the fontNamesIgnoreCheck array to ignore checks for the font, as it may take longer to load.

  1. Import the font CSS in the project. Here, we are importing the stylesheet in index.html.
<link href='' rel='stylesheet'>