wikEd en action

wikEd est un éditeur de texte complet pour navigateur qui ajoute des fonctions de traitement de textes à Wikipédia et à tout autre MediaWiki lors de l'édition de pages. Il ne fonctionne actuellement qu'avec les navigateurs Chromium et Mozilla y compris Google Chrome et Mozilla Firefox. wikEd est un éditeur pseudo-WYSIWYG et il contient beaucoup de fonctionnalités spécifiques à MediaWiki. Reportez-vous à la page d'aide pour une description de toutes les fonctions et de tous les boutons.

Version actuelle : 0.9.132 du 8 juillet 2014 (placez la souris sur le logo wikEd en haut de la page pour connaître la version installée chez vous).
Pour mettre à jour votre installation vers la dernière version stable, appuyez sur Maj en cliquant sur Recharger ou enfoncez Ctrl-Maj-R.

Aperçu rapide

[modifier | modifier le code]
(Pour une liste détaillée des fonctions voir ci-dessous)

Configuration nécessaire

[modifier | modifier le code]

Fonctions

[modifier | modifier le code]

Voir aussi l'aide de wikEd pour une description de tous les boutons et fonctions.

wikEd ajoute les boutons et fonctions suivantes à la zone d'édition :

Boîte utilisateur wikEd

[modifier | modifier le code]

Coller le texte suivant dans votre page utilisateur :

((Utilisateur wikEd))

pour obtenir cette boîte :

WikEd


Vérifier qui utilise cette boîte.

Problèmes généraux connus

[modifier | modifier le code]

Installation

[modifier | modifier le code]

Il existe deux installations possibles :

Merci de ne pas copier le code complet de wikEd !

  1. connectez-vous avec votre nom d'utilisateur
  2. cliquez sur le lien suivant pour éditer votre page Utilisateur:VotreNom/common.js : Special:Mypage/common.js.
  3. (point facultatif) les modifications de Special:Mypage/common.js se répércutent sur toutes les apparences. Si vous souhaitez personnaliser WikEd pour une seule apparence, alors vous devez remplacer common.js par le nom style que vous utilisez. Exemple : Special:Mypage/Monobook.js pour le style Monobook (voir Aide:Personnaliser l'interface pour plus de détails)
  4. ajoutez le code suivant à cette page : ((subst:wikEd)). Ceci ajoutera le code suivant à votre ficher .js :
// Installe wikEd pour l'édition des pages (pour tous)
// Traduction de [[Utilisateur:Leag|Leag]] : [[Utilisateur:Leag/wikEd|wikEd]]

// disable loading for IE, not needed, but might save a few milliseconds
if (navigator.appName != 'Microsoft Internet Explorer') {

// install [[:en:User:Cacycle/wikEd]] in-browser text editor
mw.loader.load( '//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-WikEd.js/local&action=raw&ctype=text/javascript' );
}

Si vous souhaitez utiliser un fichier de correction typographique, ajoutez ces lignes avant le code wikEd :

var wikEdConfig = {};
wikEdConfig.fixPunctFrench = true;
wikEdConfig.regExTypoFix = true;
wikEdConfig.regExTypoFixURL = 'http://fr.wikipedia.org/w/index.php?title=Wikipédia:AutoWikiBrowser/Typos&action=raw';

http://fr.wikipedia.org/wiki/Wikipédia:AutoWikiBrowser/Typos?action=raw peut être remplacé par le fichier de votre choix.

Si le code est déjà présent dans votre common.js, vérifiez que le code d'installation n'est pas encadré par des balises /*...*/.
5. sauvegardez la page
6. actualisez le cache de votre navigateur : appuyez sur Shift et cliquez sur Recharger (ou appuyez sur Ctrl-Shift-R)
7. le logo wikEd devrait maintenant apparaître tout en haut de la page à côté de Déconnexion.

Compatibilité

[modifier | modifier le code]

En général, wikEd est incompatible avec les scripts, add-on, ou extension qui modifient le texte de la fenêtre d'édition. La raison est que wikEd remplace la fenêtre de texte normale par sa propre fenêtre enrichie. La plupart des scripts continueront à fonctionner si wikEd est temporairement désactivé en cliquant sur le bouton , qui active ou désactive wikEd.

Scripts compatibles

[modifier | modifier le code]

Scripts et greffons incompatibles

[modifier | modifier le code]

Rendre un script compatible avec wikEd

[modifier | modifier le code]

The wikEd edit box is a rich-text iframe while the standard edit box is a textarea with the id wpTextbox1. Nevertheless, developers can make their script compatible with wikEd by copying the text from the wikEd iframe to the standard textbox before making their changes and then copying the content back to the iframe. The following code is cross-browser compatible and wikEd-independent:

// copy wikEd (http://en.wikipedia.org/wiki/User:Cacycle/wikEd.js) frame to wpTextbox1 textarea
if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
        WikEdUpdateTextarea();
    }
}

// make the changes to the classic wpTextbox1 textarea //

// copy wpTextbox1 textarea back to wikEd frame
if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
        WikEdUpdateFrame();
    }
}

Troubleshooting / FAQ

[modifier | modifier le code]

wikEd does not load

[modifier | modifier le code]

You have followed the installation instructions above, but the wikEd logo is not displayed on top of the pages next to the log out link and the wikEd buttons do not appear on edit pages. Please try the following:

You have been installing custom buttons a while ago and now wikEd crashes during page loading and editing might not be possible without disabling Javascript:

For other problems see the wikEd help page.

Customization

[modifier | modifier le code]

wikEd is fully customizable, including color schemes, language, and custom buttons and functions. Add any number of user configurable variables with your own values to your common.js page. Please check the start of the wikEd script for available variables. They all have a '||' followed by the default value in their definition, similar to:

// initial font size of edit window (percentage) var wikEdFontSize = wikEdFontSize || 100;

All customizations must be placed before the wikEd installation block.

Customization examples

[modifier | modifier le code]

Show the button to fix common typos using AutoWikiBrowser RegExTypoFix rules:

var wikEdRegExTypoFix = true;

Change a syntax highlighting style:

var wikEdFrameCSS = [];
wikEdFrameCSS['.wikEdLinkName'] = 'color: #00a000; font-weight: bold;';

Change a user interface (button) image:

 var wikEdImage = [];
 wikEdImage['logo'] = '6/67/my_logo.png';

Change a user interface text:

var wikEdText = [];
wikEdText['wikEdLogo alt'] = 'wikEd';
wikEdText['wikEdLogo text'] = 'wikEd {wikEdProgramVersion}, click to disable';

Add your own summary presets:

var wikEdComboPresetOptions = [];
wikEdComboPresetOptions['summary'] = [
 'super-duper mega edit', 'copyedit', 'reply', 'article created', 'intro rewrite',
 'linkfix', 'fixing typos', 'removing linkspam', 'reverting test',
 'reverting vandalism', 'formatting source text', '{wikEdUsing}'
];

Add your own (regexp) presets to the search and replace fields:

var wikEdComboPresetOptions = [];
wikEdComboPresetOptions['find'] = [
 '\n +', 'wiked'
];
wikEdComboPresetOptions['replace'] = [
 '\n', '\'\'\'wikEd\'\'\''
];

Change a user interface style:

var wikEdMainCSS = [];
wikEdMainCSS['.wikEdButton'] = 'background: blue;';

Enable the Source button to display the source code of pasted content or of syntax highlighted text:

var wikEdShowSourceButton = true;

Change the presets of the toggle buttons in the wikEd control bar:

var wikEdHighlightSyntaxPreset = true;
var wikEdUseWikEdPreset = true;
var wikEdUsingPreset = false;
var wikEdFullScreenModePreset = false;
var wikEdCloseToolbarPreset = false;
var wikEdRefHidePreset = false;
var wikEdDiffPreset = false;

Display the wikEd buttons below the edit box

var wikEdButtonsOnTop = false;

Change the history lengths:

var wikEdHistoryLength = [];
wikEdHistoryLength['find'] = 15;
wikEdHistoryLength['replace'] = 15;
wikEdHistoryLength['summary'] = 20;

Change text to automatically append to summaries:

var wikEdSummaryUsing = '…still using wikEd';

Custom buttons

[modifier | modifier le code]

You can add your own editing buttons and functions to two custom button bars, one right to the formatting buttons (custom1) and the other right the fixing buttons (custom2). Add the following code to your common.js page before the wikEd installation block:

// define  custom buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters)
var wikEdButton = [];
wikEdButton[100] = ['wikEdDiv', 'wikEdButton', 'Make the selection a html DIV element', 'http://upload.wikimedia.org/wikipedia/commons/6/67/WikEd_logo.png', '16', '16', 'DIV', 'javascript:WikEdEditButton(this, this.id, null, TestHandler);' ];
wikEdButton[101] = ['wikEdTest', 'wikEdButton', 'This is a test button', 'http://upload.wikimedia.org/wikipedia/commons/0/07/WikEd_disabled.png', '16', '16', 'Test', 'javascript:WikEdEditButton(this, this.id, null, TestHandler);' ];

// define custom button bars (id outer, class outer, id inner, class inner, height, grip title, button numbers)
var wikEdButtonBar = [];
wikEdButtonBar['custom1'] = ['wikEdButtonBarCustom1',  'wikEdButtonBarCustom1',  'wikEdButtonsCustom1',  'wikEdButtonsCustom1',  44, 'My custom buttons', [100, 'br', 101] ];
wikEdButtonBar['custom2'] = ['wikEdButtonBarCustom2',  'wikEdButtonBarCustom2',  'wikEdButtonsCustom2',  'wikEdButtonsCustom2',  44, 'My custom buttons', [100, 'br', 101] ];

// define the function which is called upon clicking the custom button

function TestHandler(obj) {

// select the appropriate text change target (whole, selection, cursor, focusWord, focusLine, selectionWord, or selectionLine)
//   focus... is the text under the cursor; ...Word and ...Line extend the target to the start/end of the word or line
  WikEdGetText(obj, 'selection, cursor');
  if (obj.selection.plain != '') {
    obj.changed = obj.selection;
  }
  else {
    obj.changed = obj.cursor;
  }

// make the changes to the plain target text

// remove the previously added formatting
  if ( /<div>(.*?)<\/div>/i.test(obj.changed.plain) ) {
    obj.changed.plain = obj.changed.plain.replace(/<div>(.*?)<\/div>/gi, '$1');
  }

// add the text formatting
else {
    obj.changed.plain = '<div>' + obj.changed.plain + '</div>';
    obj.changed.plain = obj.changed.plain.replace(/(<div>)( *)(.*?)( *)(<\/div>)/, '$2$1$3$5$4');
  }

// keep the changed text selected, needed to remove the formatting with a second click
  obj.changed.keepSel = true;

  return;
}

Traductions

[modifier | modifier le code]

Voir wikEd international pour les traductions de wikEd et comment les installer. wikEd a déjà été traduit en :

Internet Explorer et les autres navigateurs

[modifier | modifier le code]

wikEd ne fonctionne pas avec Internet Explorer et les navigateurs non issus de Mozilla. Néanmoins, le programme n'utilise que du Javascript standard indépendant du navigateur et devrait donc être relativement facile à adapter pour MS Internet Explorer 7+ et Opera 9+. Il serait très apprécié si vous aidiez à cette tâche. Veuillez s'il-vous-plaît laisser un message sur la page de discussion de Cacyle ou vérifier la documentation du programme et la page de discussion de développement.

Rapports de bogue

[modifier | modifier le code]

Merci de poster un rapport de bogue à en:User_talk:Cacycle/wikEd.

Témoignages

[modifier | modifier le code]

Vous êtes un heureux utilisateur de wikEd? Vous pouvez laisser un témoignage ici Émoticône

Une discussion sur les espaces et la ponctuation est amorcée ICI ptyxs (d) 15 mars 2008 à 09:00 (CET)
Merci pour l'info.--Manu (discuter) 15 mars 2008 à 19:12 (CET)
Comme je ne peux plus afficher les anciens outils, je suis désormais obligé de travailler sans aucune barre d'outils, ce qui évidemment ne simplifie pas la vie. Je ne continuerai pas longtemps comme ça. Ce qui est terrible avec les informaticiens, c'est que quand ils peuvent faire une chose, ils s'empressent de la réaliser. Hélas, ce sont souvent les autres qui en font les frais.
Cordialement, Jean-Jacques MILAN (discuter) 14 décembre 2016 à 13:14 (CET), administrateur de Wikibooks et auteur de plusieurs dizaines de milliers de contributions (plus de 70 000, aux dernières nouvelles).

Qui l'utilise ?

[modifier | modifier le code]

Le tableau et les liens suivants donnent une idée du nombre de personnes qui utilisent wikEd :

Date Version Anglais
liens rechercher
Allemand
liens rechercher
Portugais
liens rechercher
Français
liens rechercher
November 14, 2006 0.9.7 62
November 17, 2006 0.9.7 73
November 24, 2006 0.9.10 80
November 30, 2006 0.9.11c 101
December 10, 2006 0.9.12b 114
December 19, 2006 0.9.13b 134
December 30, 2006 0.9.14b 146 4 3
January 10, 2007 0.9.19a 163
January 11, 2007 0.9.19a 180 6
January 15, 2007 0.9.20c 213
January 17, 2007 0.9.20d 225
January 18, 2007 0.9.20d 239
January 22, 2007 0.9.21 251
February 1, 2007 0.9.23 286
February 8, 2007 0.9.24c 322 12 10
February 20, 2007 0.9.25 376 18 13
February 24, 2007 0.9.27c 401
March 6, 2007 0.9.27f 459
March 12, 2007 0.9.28 474
March 16, 2007 0.9.29 492
March 17, 2007 0.9.29 500
March 31, 2007 0.9.30 600
April 5, 2007 0.9.33 624
April 9, 2007 0.9.33e 639 24 12
April 14, 2007 0.9.35 664
April 23, 2007 0.9.35f 712 30
October 30, 2007 0.9.48c 1257 38

Ces nombres tiennent compte uniquement des installations correctes comme indiqué ci-dessus.

Ce que wikEd n'est pas

[modifier | modifier le code]
[modifier | modifier le code]

Modèle:PD-self

Voir aussi

[modifier | modifier le code]