buttons.push('html');
+buttons.push('wcfSeparator');
+
buttons.push('bold');
buttons.push('italic');
buttons.push('underline');
-
buttons.push('deleted');
-buttons.push('subscript');
-buttons.push('superscript');
-buttons.push('lists');
-buttons.push('alignment');
+buttons.push('wcfSeparator');
-{*
-{if $__wcf->getBBCodeHandler()->isAvailableBBCode('font')}
- buttons.push('fontfamily');
-{/if}
-*}
+buttons.push('subscript');
+buttons.push('superscript');
{if $__wcf->getBBCodeHandler()->isAvailableBBCode('size')}
buttons.push('woltlabSize');
{/if}
buttons.push('woltlabColor');
{/if}
+buttons.push('wcfSeparator');
+
+buttons.push('lists');
+buttons.push('alignment');
+
{if $__wcf->getBBCodeHandler()->isAvailableBBCode('url')}
buttons.push('link');
{/if}
buttons.push('table');
{/if}
+buttons.push('wcfSeparator');
+
buttons.push('woltlabMedia');
-buttons.push('woltlabQuote');
\ No newline at end of file
+buttons.push('woltlabQuote');
for (var i = 0, length = this.opts.buttons.length; i < length; i++) {
buttonName = this.opts.buttons[i];
+ if (buttonName === 'wcfSeparator') {
+ // seperators will be inserted in the next step
+ continue;
+ }
+
//noinspection JSUnresolvedVariable
buttonData = this.opts.woltlab.buttons[buttonName];
toolbarOrder.push(buttonName);
}
+ var addSeparator = false;
for (i = 0, length = this.opts.buttons.length; i < length; i++) {
buttonName = this.opts.buttons[i];
- toolbar.appendChild(toolbarButtons[buttonName]);
+ if (buttonName === 'wcfSeparator') {
+ addSeparator = true;
+ continue;
+ }
+
+ listItem = toolbarButtons[buttonName];
+ toolbar.appendChild(listItem);
toolbarOrder.splice(toolbarOrder.indexOf(buttonName), 1);
+
+ if (addSeparator) {
+ listItem.classList.add('redactor-toolbar-separator');
+ addSeparator = false;
+ }
}
// add remaining elements