Reputation: 23999
I am using jquery redactor and all is good but I want to make some sections behave like an edit-in-place editor.
I understand how buttons work e.g.:
var buttons = ['formatting', '|', 'bold', 'italic'];
$('#redactor').redactor({buttons: buttons});
And have set buttons to:
var buttons = [];
So no buttons, but, toolbar still shows.
QUESTION Is there a way to remove the toolbar as well as the buttons?
Upvotes: 1
Views: 2053
Reputation: 344
After dragging a div from the document i want to focus on the editable redactor. How to trigger focus function on redactor editable area?
I tried:
$('#'+maskId).draggable({
containment: '#content',
drag: function(){
// ...
},
stop: function() {
$('#'+redactorTextareaId).redactor({
focus: true
});
}
});
and:
$('#'+maskId).draggable({
containment: '#content',
drag: function(){
// ...
},
stop: function() {
$('#'+redactorTextareaId).focus();
}
});
Upvotes: 0
Reputation: 38092
If you set buttons
with a empty array you use default setting:
['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|',
'unorderedlist', 'orderedlist', 'outdent', 'indent', '|',
'image', 'video', 'file', 'table', 'link', '|',
'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule']
So, you can set toolbar
setting like this :
$('#redactor').redactor({
toolbar: false
});
And if you want the toolbar is loaded in a separate layer from the editor:
$('#redactor').redactor({
toolbarExternal: '#your-toolbar-id'
});
Documentation: http://imperavi.com/redactor/docs/settings/
Upvotes: 5
Reputation: 6132
Yes it's possible, with the help of the toolbar
property:
$('#redactor').redactor({toolbar: false});
Reference: http://imperavi.com/redactor/docs/settings/
Upvotes: 0