diff options
Diffstat (limited to 'lib/scripts')
-rw-r--r-- | lib/scripts/toolbar.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 99ad1bb9c..37987c21a 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -5,12 +5,13 @@ var pickercounter=0; /** * Create a toolbar * - * @param string tbid ID of the element where to insert the toolbar - * @param string edid ID of the editor textarea - * @param array tb Associative array defining the buttons + * @param string tbid ID of the element where to insert the toolbar + * @param string edid ID of the editor textarea + * @param array tb Associative array defining the buttons + * @param bool allowblock Allow buttons creating multiline content * @author Andreas Gohr <andi@splitbrain.org> */ -function initToolbar(tbid,edid,tb){ +function initToolbar(tbid,edid,tb, allowblock){ var toolbar = $(tbid); if(!toolbar) return; var edit = $(edid); @@ -22,6 +23,9 @@ function initToolbar(tbid,edid,tb){ var cnt = tb.length; for(var i=0; i<cnt; i++){ + if (!allowblock && tb[i].block === true) { + continue; + } var actionFunc; // create new button |