2012-10-24 23 views
5

Đây là mã của tôi:Hủy bỏ nút từ người biên soạn wysiwyg

http://jsfiddle.net/KfVJK/

Đây là mã để thêm người biên soạn:

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

Tôi muốn hạn chế số lượng các nút trên thanh công cụ. Ví dụ: chỉ có định dạng cơ bản như in đậm, in nghiêng, v.v.

Làm cách nào để xóa các nút khỏi thanh công cụ?

Trả lời

7

Sử dụng buttons thiết lập:

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

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

Đây là chiết xuất từ ​​documentation:

Theo mặc định, thiết lập này chứa các mảng sau nút thanh công cụ của:

['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'] 
}); 
Các vấn đề liên quan