Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Aloha Editor toolbar?

Is there a way to disable Aloha's ExtJS toolbar in the same way as sidebar?

Aloha.settings =
    modules: ['aloha', 'aloha/jquery']
    editables: '.editable'
    jQuery: $
    sidebar:
        disabled: true
    toolbar:
        disabled: true # does not work

enter image description here

like image 931
mateusmaso Avatar asked May 15 '12 20:05

mateusmaso


3 Answers

You can just hide it with css such as:

div.aloha-toolbar {
    display: none !important;
}
like image 150
Ryan Avatar answered Nov 06 '22 16:11

Ryan


Mark element with class

<div class="editable notoolbar"></div>

Use event:

Aloha.ready(function () {
    var $ = Aloha.jQuery;
    Aloha.bind('aloha-editable-activated', function () {
        if ($(Aloha.activeEditable.obj[0]).hasClass("notoolbar")) {
            $(".aloha-toolbar").hide();
        }
    });
});
like image 2
dany Avatar answered Nov 06 '22 15:11

dany


There is no easy way to disable the floating menu. You have to disable it by editing the source code you can do this by removing a couple lines. If you comment out line 1207-1210 the floating menu won't show up.

Hope this helps!

like image 2
albinohrn Avatar answered Nov 06 '22 16:11

albinohrn