[Mediawiki-l] Adding a "strikeout" button to the text editing format toolbar

Alexis Moinet alexis.moinet at fpms.ac.be
Fri Jan 4 15:00:52 UTC 2008


Simply add the code to the page [[MediaWiki:Common.js]], then edit any page and, in case the button doesn't appear, force refresh your browser.

(assuming you didn't change the default config that enables javascript in Mediawiki)

Monahon, Peter B. wrote :
> I'd love to add a "strikeout text" button to the text editing format
> toolbar.  I found this:
> 
> http://www.mediawiki.org/wiki/User:Robchurch/Extra_toolbar_buttons (see
> below *)
> 
> (And this: http://commons.wikimedia.org/wiki/Mediawiki_edit_toolbar )
> 
> But can't see how to implement it - does it require an extension, or
> where would the code go, or is it experimental and non-functional?
> 
> Any clues to this or other solutions?
> 
> Help?  Thanks.
> 
> ===
> 
> * Quoted from above:
> 
> ....[snip]...
> function addCustomButton(imageFile, speedTip, tagOpen, tagClose,
> sampleText, imageId) {
>    mwCustomEditButtons[mwCustomEditButtons.length] =
>     {"imageId": imageId,
>      "imageFile": imageFile,
>      "speedTip": speedTip,
>      "tagOpen": tagOpen,
>      "tagClose": tagClose,
>      "sampleText": sampleText};
> }
> ....[snip]...
> addCustomButton('http://upload.wikimedia.org/wikipedia/commons/c/c9/Butt
> on_strike.png','Rayer','<s>','</s>','');
> ....[snip]... 
> /*




More information about the MediaWiki-l mailing list