A
A
Artyom2019-02-20 18:58:15
Django
Artyom, 2019-02-20 18:58:15

Template for creating posts on the site?

In general, I make a blog on Django. The bottom line is that the general design of posts can be set in templates and static files.
How to format text? Those. for example, so that I can log in, open a form, such as VKontakte or on a toaster, and highlight headings, bold text , italics , etc.? I seem to have seen html editors, but then how will all this information be stored in the database?
In general, what to use so that you can format the text, conditionally as in a Word (just an example, the list of functions can be minimal), and at the same time it is displayed correctly on the site?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
Xaip, 2019-02-20
@kot_mapku3

https://github.com/django-ckeditor/django-ckeditor
All information in the database will be stored along with html tags.
In the templates, you need to turn off autoescape
And in the admin panel, pull up styles and js
You can still use the antediluvian markdown, but few people who can write on it, the times are gone)

S
sim3x, 2019-02-20
@sim3x

Use markdown/rst markup - it's safer than disabling escaping
https://simpleisbetterthancomplex.com/series/2017/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question