Contributors/Projects/Removal of the 2006 wikitext editor

From mediawiki.org
Screenshot of the 2006 wikitext editing toolbar
This change affects only a tiny fraction of editors, whose edit window has blue–gray buttons like these. This change does not affect you if your editing window has no buttons, blue buttons, white buttons, light gray buttons, etc.

The 2006 wikitext editor is being removed from production on WMF sites. If you do not know which editor you use, then please look at the list of editors to see screenshots for most of the editing environments in use.

Data indicates that very few active editors are using this, so it doesn't make sense to commit further resources to maintaining it. Rather than waiting for this to break unexpectedly, we are ending support and sunsetting the software in an orderly, scheduled fashion.

What will happen[edit]

On 30 October–1 November 2018, the code for this wikitext editor and associated preference options will be removed from production, through the normal deployment train.

This change will be made at the English Wikipedia Beta Cluster on 23 October 2018 (the Tuesday before the deployment). (Other test wikis are possible on the same day; please contact User:Whatamidoing (WMF) to request any other test wiki.) You can import your scripts to the Beta Cluster and test them there for approximately six days before the next deployment train runs. Please consider setting up your scripts now, so that you have everything in place when the testing can begin on that Tuesday. Watch phab:T30856 for the announcement that the old editor has been removed from the Beta Cluster.

When this editor is removed, the editors that are using it will default to the 2003 wikitext editor, which has no buttons or toolbar. The team chose this option because the editors who are still using this old toolbar regularly tend to be high-volume editors, and the 2003 wikitext editor will load more quickly and take up less space on their screens than the alternatives. All editors are free to change their editing preferences at any time by going to Special:Preferences#mw-prefsection-editing and choosing from among the options (or to choose local gadgets and user scripts).

CharInsert is not being removed[edit]

Is this missing on your wiki? This is called CharInsert, and it is NOT being removed. If it's disappeared, then you may have a broken local gadget.

CharInsert is not being removed. If your wiki has over-ridden the default installation with a gadget, then you may need to fix your local gadget. Re-installing the 2006WTE will not fix your broken gadget.

Alternatives[edit]

With minor adaptations, the toolbar can be imported locally as a gadget on any wiki. Proceed as follow:

The toolbar can then be used in code pretty much as before, except that the mediawiki.toolbar module is now in the ext.gadget namespace. For example, the code to add a custom toolbar button would look like this:

mw.loader.using( 'ext.gadget.mediawiki.toolbar', function () {
  mw.toolbar.addButton( {
    imageFile: '//upload.wikimedia.org/wikipedia/commons/f/fe/New_icon_shiny_badge.svg',
    speedTip: 'Souhaiter la bienvenue aux nouveaux',
    tagOpen: '{{Bienvenue nouveau|Trizek|sign\=~'+'~'+'~'+'~|message\=}}',
    tagClose: '',
    sampleText: '',
    imageId: 'mw-editbutton-bienvenutageproto'
  } );
} );

Apart from the mw.loader.using bit, this example code has been copied unchanged from the code snippet in a personal user's javascript page.

If you want to provide not only the toolbar framework but also the default buttons that have been removed in October 2018, you can create another gadget that depends on the first one. Proceed as follow:

  • create MediaWiki:Gadget-LegacyToolbar2006.js and put in it the code below (don't forget to translate it!)
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/e/e2/Button_bold.png",
        speedTip: "Texte en gras",
        tagOpen: "'''",
        tagClose: "'''",
        sampleText: "texte en gras",
        imageId: "mw-editbutton-bold"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/1/1d/Button_italic.png",
        speedTip: "Texte en italique",
        tagOpen: "''",
        tagClose: "''",
        sampleText: "texte en italique",
        imageId: "mw-editbutton-italic"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/c/c0/Button_link.png",
        speedTip: "Lien interne",
        tagOpen: "[[",
        tagClose: "]]",
        sampleText: "titre de la page",
        imageId: "mw-editbutton-link"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/e/ec/Button_extlink.png",
        speedTip: "Lien externe",
        tagOpen: "[",
        tagClose: "]",
        sampleText: "http://www.example.com titre du lien",
        imageId: "mw-editbutton-extlink"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/7/78/Button_head_A2.png",
        speedTip: "Chapitre de niveau 2",
        tagOpen: "== ",
        tagClose: " ==",
        sampleText: "Nom du chapitre",
        imageId: "mw-editbutton-headline"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/d/de/Button_image.png",
        speedTip: "Image",
        tagOpen: "[[Fichier:",
        tagClose: "|thumb|Description de l'image.]]",
        sampleText: "Exemple.jpg",
        imageId: "mw-editbutton-image"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/1/19/Button_media.png",
        speedTip: "Média",
        tagOpen: "[[Fichier:",
        tagClose: "|thumb|Description du média.]]",
        sampleText: "Exemple.ogg",
        imageId: "mw-editbutton-media"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/8/82/Nowiki_icon.png",
        speedTip: "Ignorer le format wiki",
        tagOpen: "<nowiki"+">",
        tagClose: "</"+"nowiki>",
        sampleText: "",
        imageId: "mw-editbutton-nowiki"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/6/6d/Button_sig.png",
        speedTip: "Signature datée",
        tagOpen: "-- ~~"+"~~",
        tagClose: "",
        sampleText: "",
        imageId: "mw-editbutton-signature"
    } );
    
    mw.toolbar.addButton( {
        imageFile: "//upload.wikimedia.org/wikipedia/commons/0/0d/Button_hr.png",
        speedTip: "Ligne horizontale",
        tagOpen: "--"+"--",
        tagClose: "",
        sampleText: "",
        imageId: "mw-editbutton-hr"
    } );
    
  • add this line in your local MediaWiki:Gadgets-definition: * LegacyToolbar2006 [ResourceLoader|dependencies=ext.gadget.mediawiki.toolbar] | LegacyToolbar2006.js.

For third-party wikis[edit]

This was deprecated in MediaWiki 1.29 and will be removed during 1.32. See phab:T30856#3216507 for more information about how this might affect your wiki.

See also[edit]