Support for custom fonts for rich text editor streamlined (#667343)
It is now possible to manage available fonts for the comment and email editor of the Web Client and the template editor of the Web Admin Suite in one central place. The fonts can be uploaded to the path design/fonts of the data directory and referenced in the fonts.css file located in the same directory.
Example:
- Go to
design/fontson the Data directory page of the Web Admin Suite. - Upload
Aptos.ttf. - Create
fonts.csswith the following content:@font-face {font-family: 'Aptos';src: url(Aptos.ttf);}
If a theme is configured, the Web Client only considers the fonts defined inside the theme, e.g. in design/<my_theme>/fonts.css.
In addition, the Rich text templates page of the Web Admin Suite has been improved to make font settings more transparent. The Global editor configuration button has been added to the Content tab for this purpose. It contains the following settings:
- Global rich text font: Page customization setting
globalRichTextFontincmApplicationCustomization. Defines the default font for all rich text editors in the Web Client and Web Admin Suite, i.e. the email and comment editor, the editor for rich text fields and the template editor. - Global rich text font size: Page customization setting
globalRichTextFontSizeincmApplicationCustomization. Defines the default font size for all rich text editors in the Web Client and Web Admin Suite, i.e. the email and comment editor, the editor for rich text fields and the template editor. - Configuration: Page customization setting
configurationinCmRichTextEditorCustomization.Defines the configuration for the rich-text editor (froala) for all templates as a JSON object. You need to put properties in brackets, e.g.{"height":"1000px"}.
Please see Usability Web Client for best practices regarding font size and font family handling in rich text editors.