2012-10-24 5 views
5

を、ボタンを外しこれは私のコードです:は、のredactorのWYSIWYGから

http://jsfiddle.net/KfVJK/

これはのredactorを追加するコードです:

$(document).ready(
      function() 
      { 
       $('#redactor_content').redactor(); 
      } 
     );​ 

私は、ツールバー上のボタンの数を制限したいです。たとえば、太字、イタリック体などの基本的な書式設定だけがあります。

ツールバーからボタンを削除するにはどうすればよいですか?

答えて

7

buttons設定を使用してください:

var buttons = ['formatting', '|', 'bold', 'italic']; 

$('#redactor').redactor({buttons: buttons}); 

これはdocumentationからの抜粋です:デフォルトでは

、この設定は、ツールバーの ボタンの次の配列が含まれています

['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 
'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 
'image', 'video', 'file', 'table', 'link', '|', 
'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule'] 

// additional buttons 
// 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify' 
// If you wish to set your own array, set it in this option: 

$('#redactor').redactor({ 
    buttons: ['html', '|', 'formatting', '|', 'bold', 'italic'] 
}); 
関連する問題