【发布时间】:2020-12-09 11:34:49
【问题描述】:
我在 website 上使用 Django Summernote。这就是编辑器的外观。 您可以在下面找到我的 Summernote 编辑器的 django 设置。
SUMMERNOTE_CONFIG = {
# Or, you can set it as False to use SummernoteInplaceWidget by default - no iframe mode
# In this case, you have to load Bootstrap/jQuery stuff by manually.
# Use this when you're already using Bootstraip/jQuery based themes.
'iframe': False,
# You can put custom Summernote settings
'summernote': {
# As an example, using Summernote Air-mode
'airMode': False,
# Change editor size
'width': '100%',
'height': '480',
'toolbar': [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']],
],
'codemirror': {
'mode': 'htmlmixed',
'lineNumbers': 'true',
# You have to include theme file in 'css' or 'css_for_inplace' before using it.
'theme': 'monokai',
},
}
}
但遗憾的是,它没有代码块选项来显示编程sn-ps。我在这里做错了什么?
【问题讨论】:
标签: django summernote