【问题标题】:Django-TinyMCE Theme optionsDjango-TinyMCE 主题选项
【发布时间】:2018-07-08 06:19:38
【问题描述】:

TINYMCE_DEFAULT_CONFIG 有一个设置主题的选项,在我复制的代码中,该主题设置为“高级”。我想将其更改为“现代”或其他选项之一,但似乎不允许这样做?还是我需要将主题下载到某个地方?

我如何知道哪些按钮选项归属于哪个插件?

TINYMCE_DEFAULT_CONFIG = {
    'plugins': "paste,searchreplace, wordcount",
    '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,
}

【问题讨论】:

    标签: django tinymce django-tinymce


    【解决方案1】:

    这是一个老问题,但对于将来遇到此问题的任何其他人,这里是解决问题的配置,并由名为 troycampbell 的 git 用户共享

    TINYMCE_DEFAULT_CONFIG = {
        "height": "320px",
        "width": "960px",
        "menubar": "file edit view insert format tools table help",
        "plugins": "advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code "
        "fullscreen insertdatetime media table paste code help wordcount spellchecker",
        "toolbar": "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft "
        "aligncenter alignright alignjustify | outdent indent |  numlist bullist checklist | forecolor "
        "backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | "
        "fullscreen  preview save print | insertfile image media pageembed template link anchor codesample | "
        "a11ycheck ltr rtl | showcomments addcomment code",
        "custom_undo_redo_levels": 10,
    }
    

    您还可以添加这些参数:

    'theme': "silver",
    'branding': False,
    'skin': 'oxide-dark',
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-01
      • 1970-01-01
      • 2011-12-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多