CMS_PLUGIN_TEXT_TINYMCE_CONFIG = {}
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme'] = "advanced"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_buttons1'] = "cut,copy,paste,|,undo,redo,removeformat,|,code,preview,cleanup,|,help,|,hr,charmap,insertdate,inserttime"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_buttons2'] = "styleselect,formatselect,fontselect,fontsizeselect,|,justifyleft,justifycenter,justifyright,"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_buttons3'] = "bold,italic,underline,strikethrough,sub,sup,|,forecolor,backcolor,|,blockquote ,link,unlink,anchor,image,|,bullist,numlist,|,indent,outdent,"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_toolbar_location'] = "top"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_toolbar_align'] = "left"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_statusbar_location'] = "bottom"
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme_advanced_resizing'] = True
cms/plugins/text/widgets/tinymce_widget.py
assert 'id' in final_attrs, "TinyMCE widget attributes must contain 'id'"cms/plugins/text/settings.py
mce_config = cms.plugins.text.settings.TINYMCE_CONFIG.copy()
mce_config.update(get_language_config(self.content_language))
if USE_TINYMCE:となっている。
import tinymce.settings
TINYMCE_CONFIG = getattr(settings, 'CMS_PLUGIN_TEXT_TINYMCE_CONFIG', tinymce.settings.DEFAULT_CONFIG)
CMS_PLUGIN_TEXT_TINYMCE_CONFIG['theme'] = "advanced"
を入れておかないとerror
0 件のコメント:
コメントを投稿