2016-11-03 5 views
1

私はdjango CKeditorプラグインを使用しています。私の設定は次の通りです:Django CKeditorでは、異なるフィールドに異なるツールバーを読み込む方法は?

CKEDITOR_CONFIGS = { 
'default': { 
    'skin': 'moono', #'office2013' 
    'toolbar': 'Custom', #selects from below 
    'toolbar_Custom': [ 
      ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript'] 
    ], 
'toolbar_simple': { 
    'skin': 'moono', 
    'toolbar': 'Custom', 
    'toolbar_Custom': [ 
     ['Bold', 'Italic', 'Underline'], 
     ['NumberedList', 'BulletedList'], 
    ], 
}, 
'toolbar_basic': { 
    'toolbar': 'Basic' 
}, 
'toolbar_full': { 
    'toolbar': 'full', 
}, 
} 

時には、単純なツールバーを表示する必要があります。これどうやってするの?あなたが別のツールバーを設定するconfig_name属性を使用することができます

directions_car = RichTextField("Directions by car", max_length=1000, blank=False, default="", uses="toolbar_Custom") 

答えて

0

は、私のようなオプションがあります願っています。

directions_car = RichTextField("Directions by car", max_length=1000, blank=False, default="", config_name="toolbar_Custom") 

Reference

+0

パーフェクトお願いします。私はこれもフォームで動作することを願っています。だから、管理者とフロントエンドのために別のツールバーを定義することができます。 –

関連する問題