[Mediawiki-l] making extra buttons in edit page tool

Alexis Moinet alexis.moinet at fpms.ac.be
Thu Jun 5 09:08:44 UTC 2008


Rein wrote :
> To my surprise was the unintended consequence of installing common.js the appearance of lay-ou buttons on top of the editing screen.
> I had been looking for it desperately, but not found.
> 
> But it tasted for more!
> The positioning is just far better than on the bottom of the page. Select text and click the button - no scrolling needed!
> For instance an extra button for the making of anchored pagelinks would be very helpful: [[#|insert]insert].
> But as you maybe could learn of my opening statement: not knowing why they appeared means also not knowing where to adapt and copy the existing buttons.
> Who can help

in Mediawiki:Common.js, there is :

//Editpage scripts
if (wgAction=='edit' || wgAction == 'submit')
   importScript('MediaWiki:Editpage.js')

so let's see MediaWiki:Editpage.js : there is a function addInsertButton(...) to be used to add custom edit buttons on top of the page

;-)




More information about the MediaWiki-l mailing list