I found this code in js/tinymce/themes/xenforo/editor_template.js:
Where and how I can create or change xenforo_custom_bbcode_tags array? I want use it in my add-on.
Code:
addButtons : function (theme, tb)
{
var tags = theme.settings.[B]xenforo_custom_bbcode_tags[/B],
controlManager = theme.editor.controlManager;
//tb.add(controlManager.createControl('|'));
tb.add(controlManager.createButton('xenforo_quote',
{ title: 'xenforo.quote', cmd: 'xenForoWrapBbCode', ui: false, value: 'QUOTE' }
));
if (typeof tags === 'undefined' || tags.length === 0 || tags === {})
{
return;
}
tinymce.each(tags, function(tag, tagName) {
tb.add(controlManager.createButton('xenforo_custom_bbcode_' + tag,
{title : tag[0], image : tag[1], cmd : 'xenForoWrapBbCode', ui : false, value : tagName}
));
});
},