Roslovets-Inc/strapi-plugin-ckeditor5

How to add more fonts and font sizes to the editor toolbar? Please help, i am not able to add roboto font as the available options are very less

Closed this issue · 4 comments

How to add more fonts and font sizes to the editor toolbar? Please help, i am not able to add roboto font as the available options are very less

Hey, thanks for the great plugin! As I've the same need, it would be interesting how to solve this. 🙂 I've tried different ways without success.

First, I've tried to customize the index.html of Strapi Admin by adding an external stylesheet. But the custom index.html is out of scope of the admin build -> no luck.

The second try was adding the styles to the Strapi GlobalStyle component -> without success.

Are there any other ways?

Thanks and best,
Chris

Hi, please follow these steps to configure your editor:
https://github.com/Roslovets-Inc/strapi-plugin-ckeditor5#how-to-customize-editor-optional

To add more fonts uncomment lines 169-182 in config/ckeditor.js template and add your fonts to the list.

And checkout CKEditor docs how to add font sizes via the same config:
https://ckeditor.com/docs/ckeditor5/latest/api/module_font_fontsize-FontSizeConfig.html#member-options

How do we add new fonts for the latest version of the plugin (strapi-plugin-ckeditor5@latest with strapi v4)? I have tried copying the config file as described here https://github.com/Roslovets-Inc/strapi-plugin-ckeditor5#how-to-customize-editor-optional but it's not working.
I'm guessing these instructions aren't valid for V4? Is there another way to do this in the latest plugin?

Any update on this one @paneer-tikka ?