Text editor fonts

You can change the default font, the default style, and the inline font that are used in the Sage CRM text editor. The text editor uses styles to ensure consistency in documents created in Sage CRM.

  • To change the default font for text to which a style has not been applied, open \CRM\WWWRoot\ckeditor\contents.css and edit the body section at the top of the file. The following example changes the default font to Courier New.

      body

      {

      /* Font */

      /* font-family: sans-serif, Arial, Verdana, "Trebuchet MS"; */

      font-family: Courier New, monospaced;

      font-size: 12px;

      /* Text color */

      color: #333;

      /* Remove the background color to make it transparent */

      background-color: #fff;

      margin: 20px;

      }

  • To set the default style selected in the text editor toolbar, open \CRM\WWWRoot\ckeditor\config.js and add code to the CKEditor.editorConfig section. The following example changes the default style to Courier New.

      config.font_defaultLabel = 'Courier New, monospaced;';

      config.fontSize_defaultLabel = '16px';

      config.fontSize_sizes =

      '8/8pt;9/9pt;10/10pt;11/11pt;12/12pt;14/14pt;16/16pt;18/18pt;20/20pt;

      22/22pt;24/24pt;26/26pt;28/28pt;36/36pt;48/48pt;72/72pt';

      config.font_names = 'Courier New, monospaced;' +

      'Helvetica, Arial, sans-serif;' +

      'Times New Roman/Times New Roman, Times, serif;' +

      'Verdana';

  • To apply a default style to the text when the text editor is opened, open \CRM\WWWRoot\ckeditor\config.js and add a new section after the CKEditor.editorConfig section.

      CKEDITOR.on('instanceReady', function(evt) {

      if (evt.editor.getData() === "") {

      evt.editor.setData('<span style="font-family: Courier New, monospaced;font-size:16px;">&shy;</span>');

      }

      });

  • To view the changes, clear the cache in users’ browsers.