admin管理员组文章数量:1122832
For my forum I am trying to use Quill Rich Text editor to format my Posts and comments.
class Topic(models.Model):
title = models.CharField(max_length=70, blank=False, null=False)
description = QuillField(default="")
And managed to create some content <class 'django_quill.fields.FieldQuill'>
This is how it looks on admin form
I have tried display it in views using
<div class="">{{topic.description.html| safe}}</div>
This is how it looks in Views
I am using django-quill package enter link description here I have included all the style and script tags as recommended and still the styles are not applying.
Any ideas how I can display the content as is.
I have tried:
- Converting the delta type
{"ops":[{"attributes":{"bold":true},"insert":"dqwdqwdqdqdq"},{"insert":"\n"}]}
into html before saving the model. failed with errorTypeError: 'FieldQuill' object is not subscriptable
Please recommend reliable packages to convert delta to html or display the content with all formatting.
TIA
本文标签: How to display Field Quill in Django ViewsStack Overflow
版权声明:本文标题:How to display Field Quill in Django Views? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300687a1930906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论