2013-04-06 74 views
1

我正在使用jquery編輯器,所有的都很好,但我想讓一些部分的行爲像編輯就地編輯器一樣。沒有工具欄的編輯器

我理解按鈕的工作原理例如爲:

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

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

,並且已經設置按鈕:

var buttons = []; 

所以沒有任何按鍵,但是,工具欄仍顯示。

問題有沒有辦法刪除工具欄以及按鈕?

回答

4

如果你有一個空數組設置buttons您使用默認設置:

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

所以,你可以設置toolbar像這樣設置:

$('#redactor').redactor({ 
    toolbar: false 
}); 

如果你想在工具欄加載從編輯單獨的圖層:

$('#redactor').redactor({ 
    toolbarExternal: '#your-toolbar-id' 
}); 

文檔:http://imperavi.com/redactor/docs/settings/

0

從文件拖動一個div後,我想重點可編輯的編輯器。 如何觸發redactor可編輯區域的焦點功能?

我想:

$('#'+maskId).draggable({ 
    containment: '#content', 
    drag: function(){ 
    // ... 
    }, 
    stop: function() { 
    $('#'+redactorTextareaId).redactor({ 
     focus: true 
    }); 
    } 
}); 

和:

$('#'+maskId).draggable({ 
    containment: '#content', 
    drag: function(){ 
    // ... 
    }, 
    stop: function() { 
    $('#'+redactorTextareaId).focus(); 
    } 
}); 
相關問題