'wcf.global.button.edit': '{lang}wcf.global.button.edit{/lang}',
'wcf.global.button.enable': '{lang}wcf.global.button.enable{/lang}',
'wcf.global.button.hide': '{lang}wcf.global.button.hide{/lang}',
+ 'wcf.global.button.insert': '{lang}wcf.global.button.insert{/lang}',
'wcf.global.button.next': '{lang}wcf.global.button.next{/lang}',
'wcf.global.button.preview': '{lang}wcf.global.button.preview{/lang}',
'wcf.global.button.reset': '{lang}wcf.global.button.reset{/lang}',
'wcf.global.form.error.greaterThan': '{lang __literal=true}wcf.global.form.error.greaterThan{/lang}',
'wcf.global.form.error.lessThan': '{lang __literal=true}wcf.global.form.error.lessThan{/lang}',
'wcf.global.loading': '{lang}wcf.global.loading{/lang}',
+ 'wcf.global.noSelection': '{lang}wcf.global.noSelection{/lang}',
'wcf.global.page.jumpTo': '{lang}wcf.global.page.jumpTo{/lang}',
'wcf.global.page.jumpTo.description': '{lang}wcf.global.page.jumpTo.description{/lang}',
'wcf.global.page.pagination': '{lang}wcf.global.page.pagination{/lang}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/combined.min.js?v={@LAST_UPDATE_TIME}'
{/if}
], function () {
- require(['WoltLab/WCF/Ui/Redactor/Metacode'], function(UiRedactorMetacode) {
- var buttons = [], buttonOptions = [];
+ require(['Language', 'WoltLab/WCF/Ui/Redactor/Metacode'], function(Language, UiRedactorMetacode) {
+ Language.addObject({
+ 'wcf.editor.image.edit': '{lang}wcf.editor.image.edit{/lang}',
+ 'wcf.editor.image.insert': '{lang}wcf.editor.image.insert{/lang}',
+ 'wcf.editor.image.link': '{lang}wcf.editor.image.link{/lang}',
+ 'wcf.editor.image.link.error.invalid': '{lang}wcf.editor.image.link.error.invalid{/lang}',
+ 'wcf.editor.image.float': '{lang}wcf.editor.image.float{/lang}',
+ 'wcf.editor.image.float.left': '{lang}wcf.editor.image.float.left{/lang}',
+ 'wcf.editor.image.float.right': '{lang}wcf.editor.image.float.right{/lang}',
+ 'wcf.editor.image.source': '{lang}wcf.editor.image.source{/lang}',
+ 'wcf.editor.image.source.error.invalid': '{lang}wcf.editor.image.source.error.invalid{/lang}'
+ });
+
+ var buttons = [], buttonOptions = [], customButtons = [];
{include file='wysiwygToolbar'}
// TODO: Should the media stuff be here?
toolbarFixed: false,
woltlab: {
autosave: autosave,
- buttons: buttonOptions
+ buttons: buttonOptions,
+ customButtons: customButtons
}
};
table: { icon: 'fa-table', title: '{lang}wcf.editor.button.table{/lang}' },
underline: { icon: 'fa-underline', title: '{lang}wcf.editor.button.underline{/lang}' },
woltlabColor: { icon: 'fa-paint-brush', title: '{lang}wcf.editor.button.color{/lang}' },
+ woltlabImage: { icon: 'fa-picture-o', title: '{lang}wcf.editor.button.image{/lang}' },
woltlabMedia: { icon: 'fa-file-o', title: '{lang}wcf.editor.button.media{/lang}' },
woltlabQuote: { icon: 'fa-comment', title: '{lang}wcf.editor.button.quote{/lang}' },
woltlabSize: { icon: 'fa-text-height', title: '{lang}wcf.editor.button.size{/lang}' }
};
-
-buttons = [];
buttons.push('html');
{if $__wcf->getBBCodeHandler()->isAvailableBBCode('url')}
buttons.push('link');
{/if}
-{*
{if $__wcf->getBBCodeHandler()->isAvailableBBCode('img')}
- buttons.push('image');
+ buttons.push('woltlabImage');
{/if}
-*}
{if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')}
buttons.push('table');
{/if}
buttons.push('woltlabMedia');
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}');
+{/foreach}