@
cclaerhout Do you mind to update this addon to remove conflict with XenGallery? Your current way for adding buttons by extends editorOptions.buttons will break other addons that add buttons to editor.
If buttons are just to insert bbcode tag (without popup), I will do not need to use any JS as XF already supported it.
PHP:
public static function editor_setup(XenForo_View $view, $formCtrlName, &$message, array &$editorOptions, &$showWysiwyg)
{
if ($showWysiwyg)
{
$editorOptions['json']['buttons']['insertAlbum'] = array(
'title' => new XenForo_Phrase('sonnb_xengallery_insert_album'),
'tag' => 'album'
);
$editorOptions['json']['buttons']['insertContent'] = array(
'title' => new XenForo_Phrase('sonnb_xengallery_insert_content'),
'tag' => 'content'
);
}
}
If popup required then some JS are needed but will not break other buttons as we already have class selector for each buttons. So do not need to extend current editorOptions anymore.