获取 Django 注释以能够使用粗体和斜体样式 [英] Getting Django comments to be able to use bold and italic style
问题描述
所以我试图让富文本为奶酪程序工作,我在 textarea 中使用 tinyMCE 编辑器添加了一个评论系统.这是它的样子:
So I'm trying to get rich text to work for the cheeserater program where I added a commenting system using the tinyMCE editor in the textarea. This is what it looks like:
<table><td align=left>
{% get_comment_list for package as comment_list %}
{% for comment in comment_list %}
{{ comment.comment|safe }}<br>
{% endfor %}
</table>
下划线和文字大小有效,但粗体和斜体样式无效.例如,我在omg"下划线加粗,wtf"加粗,lol"加粗加斜体.
The underline and text size works, but the bold and italic styles don't. For example, I underlined and bolded 'omg', bolded 'wtf', bolded and italicized 'lol'.
<p><strong><span style="text-decoration: underline;">omg</span></strong><strong> wtf <em>lol</em></strong></p>
它显示为带下划线的 'omg',但 'wtf' 和 'lol' 的格式不变.
It displays as the 'omg' underlined, but 'wtf' and 'lol' has their format unchanged.
推荐答案
这些标签在这里工作得很好.检查您是否没有样式表导致这些标签使用未经修饰的样式.
Those tags work fine here. Check that you don't have a stylesheet causing those tags to use an unadorned style.
这篇关于获取 Django 注释以能够使用粗体和斜体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!