2

I have installed django-ckeditor by PIP and using it for writing blog in django admin panel.

How can I add additional fonts?

Link: https://github.com/django-ckeditor/django-ckeditor

SaeX
  • 17,240
  • 16
  • 77
  • 97
prakash09
  • 774
  • 5
  • 12

2 Answers2

0

django-ckeditor does supports the plugins developed by ckeditor team,they have one made for google web fonts ckeditor google web fonts plugin. or the other way around is adding the fonts to the ckeditor config using javascript add(programatically) google fonts to ckeditor

Community
  • 1
  • 1
Allen Fernandes
  • 1,293
  • 11
  • 18
  • The above link asks for making changes in the library files. I have installed django-ckeditor through pip so making changes in files can cause problem if the package is updated in the future. – prakash09 Nov 05 '15 at 11:48
  • 2
    there is not much information available on editing third party apps, found some [here](http://stackoverflow.com/questions/8432174/django-modifying-extending-3rd-party-apps). Otherwise just copy the django-ckeditor folder from sitepackages folder to the folder in your project where your own django apps reside same folder where your manage.py is.And then make the changes to package in your project folder, the changes will be reflected,without affecting your original plugin. – Allen Fernandes Nov 05 '15 at 19:01
0

Add the fonts you want in 'font_names' inside CKEDITOR_CONFIGS. Then you need to add "contentsCss" to add google fonts with link.

For Example: If you want Popins in ckeditor fonts then add bellow lines in CKEDITOR_CONFIGS:

'font_names': 'Poppins;serif;sans serif;monospace;cursive',
'contentsCss': ['https://fonts.googleapis.com/css?family=Poppins']

Note: Use https in contentsCss link.

bansi923
  • 839
  • 8
  • 8