Search code examples
pythonhtmldjangotemplatesckeditor

Django-ckeditor not displaying correctly in html


I have a little problem, I installed Django-ckeditor in my admin section. I can perfectly use it in Admin, but when I display on the Html page it is not showing correctly, I'll put some image to have a better visual.

Here is my admin ckeditor, works perfectly! enter image description here

Here is my html page, where the ckeditor don't works correctly enter image description here

How Can I resolve this issue ? (I use python 2.7.4 and Django 1.7.4)


Solution

  • When rendering html in templates, make sure you mark it as safe...

    {{ article.content|safe }}
    

    See documentation:

    https://docs.djangoproject.com/en/1.7/ref/templates/builtins/#safe