我使用/测试django-cms(2.3.5)+基于bootstrap的模板。 使用Django,TinyMCE的我添加代码:django-tinymce删除bootstrap HTML代码
<a class="carousel-control right" href="#this-carousel-id" data-slide="next">›</a>
但Django的TinyMCE的删除 “数据滑=” 下一步 “”
<a class="carousel-control right" href="#this-carousel-id">›</a>
,当然没有什么作品。
使用WYeditor我发现无法修改settings.py中的选项。 将TinyMCE我可以:
TINYMCE_DEFAULT_CONFIG={
# General options
'mode': "textareas",
'theme': "advanced",
'remove_linebreaks': "false",
'convert_urls': "false",
'relative_urls': "false",
'theme_advanced_resizing': "true",
'paste_auto_cleanup_on_paste': "true",
#'preformatted': "true",
'valid_elements': "+*[*]",
'width': "100%",
'height': "300px",
'theme_advanced_buttons1' : "formatselect,separator,bold,italic,hr,separator,link,unlink,separator,bullist,numlist,separator,undo,redo,",
'theme_advanced_buttons2' : "|,help,code,|",
'theme_advanced_buttons3' : "" ,
'theme_advanced_blockformats' : "p,h1,h2,h3,blockquote",
'theme_advanced_toolbar_location' : "top",
# Example content CSS (should be your site CSS)
#'content_css': 'css/example.css',
#'content_css' : "/media/css/tiny_editor.css"
}
工作流程:
- 我打开HTML弹出
- 我复制代码
- 我重新打开弹出式窗口,想要的代码是有
- 我保存页面,我重新打开弹出窗口,代码已经改变!
我该如何避免这种行为?
我还添加了保留空格/制表符/注释/的选项,以保持绝对路径,但/ static/images/path /始终转换为../../../../。 。/静态的/*。
我必须检查/更改什么?
谢谢!
https://github.com/divio/django-cms/issues/1529变化。好的,因此唯一的解决方案是创建我自己的插件? – Daviddd