Sync wysiwygToolbar ACP template with frontend version
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 4 Sep 2017 20:42:56 +0000 (22:42 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 4 Sep 2017 20:43:40 +0000 (22:43 +0200)
wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl

index 1e5a21ab8460811d0b53ea7be0172bd26e91ddd0..642d5076d3e5947f5389023c430c833874a188df 100644 (file)
@@ -78,7 +78,14 @@ buttons.push('wcfSeparator');
 buttons.push('woltlabQuote');
 
 {foreach from=$__wcf->getBBCodeHandler()->getButtonBBCodes(true) item=__bbcode}
-       buttonOptions['{$__bbcode->bbcodeTag}'] = { icon: '{$__bbcode->wysiwygIcon}', title: '{lang}{$__bbcode->buttonLabel}{/lang}' };
-       buttons.push('{$__bbcode->bbcodeTag}');
-       customButtons.push('{$__bbcode->bbcodeTag}');
+       {* the HTML bbcode must be handled differently, it conflicts with the `source` toggle-button *}
+       {if $__bbcode->bbcodeTag === 'html'}
+               buttonOptions['woltlabHtml'] = { icon: '{$__bbcode->wysiwygIcon}', title: '{lang}{$__bbcode->buttonLabel}{/lang}' };
+               buttons.push('woltlabHtml');
+               customButtons.push('woltlabHtml');
+       {else}
+               buttonOptions['{$__bbcode->bbcodeTag}'] = { icon: '{$__bbcode->wysiwygIcon}', title: '{lang}{$__bbcode->buttonLabel}{/lang}' };
+               buttons.push('{$__bbcode->bbcodeTag}');
+               customButtons.push('{$__bbcode->bbcodeTag}');
+       {/if}
 {/foreach}