【问题标题】:Size of the HTMLFields tinyMCE in DjangoDjango 中 HTMLFields tinyMCE 的大小
【发布时间】:2016-05-22 10:23:30
【问题描述】:

我最近成功安装了文本编辑器 tinyMCE 并使用了 HTMLField。

但正如您所见,该区域并没有那么大,我想将其扩大。我还有另一个问题,但这个不太重要,我将所有工具都放在了我的编辑器中,但我看不到“代码示例”,所以我想知道是否有任何提示可以添加它?

【问题讨论】:

    标签: django tinymce rich-text-editor


    【解决方案1】:

    在 setting.py 中添加:

    TINYMCE_DEFAULT_CONFIG = {
        'plugins': "table,xhtmlxtras,paste,searchreplace",
        'theme': "advanced",
        "theme_advanced_buttons3_add" : "cite,abbr",
        'cleanup_on_startup': True,
        'custom_undo_redo_levels': 10,
        'theme_advanced_buttons1': "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
        'theme_advanced_buttons2': "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        'theme_advanced_buttons3': "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        'theme_advanced_buttons4': "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
        'extended_valid_elements': "iframe[src|title|width|height|allowfullscreen|frameborder|webkitAllowFullScreen|mozallowfullscreen|allowFullScreen]",
        'theme_advanced_toolbar_location': "top",
        'theme_advanced_toolbar_align': "left",
        'theme_advanced_statusbar_location': "bottom",
        'theme_advanced_resizing': True,
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-08
      • 1970-01-01
      • 2011-01-28
      • 2011-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多