prakash09
prakash09

Reputation: 784

How to add additional fonts like google fonts in django-ckeditor?

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

Upvotes: 2

Views: 2110

Answers (2)

bansi923
bansi923

Reputation: 897

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.

Upvotes: 0

Allen Fernandes
Allen Fernandes

Reputation: 1353

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

Upvotes: 0

Related Questions