cclaerhout
Well-known member
@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.
Thank you to have provided a concrete example that easily shows how to add custom buttons to the XenForo stock editor. It's just sad this information didn't come from the XenForo developpers themselves. I've just bought your Gallery, could you please send me the version which is incompatible. Even if there's an easier way now, and thanks to you, to add custom buttons to the stock editor, I would like to understand what's wrong with the JavaScript code I was using. I will try to update the addon as soon possible, but tomorrow is my wife birthday and I have to send some presents to France so they can arrive for Christmas.