How to force styling in "Rich Text Module" ?

we would like to Force Content Creators to use particular fonts we want them to use. we want to have our own confined typography.

Configuring the Rich Text Editor (hubspot.com)
I also have stumbled upon this documentation, which explains how to disable certain features. Bt it’s not useful in our case since we do not want to remove features.

Hey, @RShaik3 Thank you for the interesting question. @Anton and @Stephanie-OG do you have any experience with what @RShaik3 is trying to accomplish?

Thank you very much! – Jaycee

Hi @RShaik3,

Without modifing the rich-text(only possible with an custom rich-text module) you can’t force users to not to use the font-selector in a rich-text (besides educating them why not to use it).

technical background: even if you set the fonts in your CSS with the sledgehammer method to “!important” (not recommended) all settings in a rich-text are implemented as inline-styling(worst possible way to style things). Since inline-styling will be rendered after the CSS it will always override it.

So you have two options in my opinion:

  • Create custom modules (not only rich-text) for specific usecases like cards where you set up all text elements as text-fields(not rich-text) and if you need a rich-text, you limit it via the JSON file
  • educate your marketers why changing fonts is a no-no :slightly_smiling_face:

Sometimes giving users less options is a better solution.

Hope this helps

best,

Anton