Jump to content

Как добавить свой шрифт

Featured Replies

hi

To add other fonts, You will need to edit the editor files (config.js and fonts.css). Unfortunately, when updating, these files are overwritten anyway, so it's not a good way.

Path: applications/core/interface/ckeditor/ckeditor

See: https://ckeditor.com/old/forums/CKEditor/Adding-fonts-to-ckeditor-4

Edited by Xontero

  • Author

The font is still not visible in the list.

config.js

CKEDITOR.editorConfig = function( config ) {
       config.contentsCss = 'https://domain.tld/fonts/fonts.css';
       config.font_names =  'dragon_alphabet/dragon_alphabet;'+config.font_names;
       config.font_names =  'dragon_alphabet'+config.font_names;
};


fonts.css

@font-face {
  font-family: 'dragon_alphabet';
  src:  url('https://domain.tld/fonts/dragon_alphabet.woff2') format('woff2'),
  url('https://domain.tld/fonts/dragon_alphabet.ttf') format('TrueType');
}

 

  • 2 недели спустя...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.