Utilisateur:Leag/wikEd
Un article de Wikipédia, l'encyclopédie libre.
{{en:User:Cacycle/wikEd_template}}
wikEd est un éditeur de texte complet pour navigateur qui ajoute des fonctions de traitement de textes à Wikipedia et à tout autre MediaWiki lors de l'édition de pages. Il ne fonctionne actuellement que pour Firefox et les navigateurs Mozilla. wikEd est un éditeur pseudo-WYSIWYG et il contient beaucoup de fonctionnalités spécifiques à MediaWiki. Reportez-vous à la page wikEd aide pour une description de toutes les fonctions et de tous les boutons.
Version courante : 0.9.33a du 5 avril 2007 (placez la souris sur le logo wikEd en haut de la page pour connaitre la version courante).
Pour mettre à jour la dernière version table appuyez sur Shift en cliquant sur Recharger ou enfoncez Ctrl-Shift-R.
[modifier] Aperçu rapide
- (For a more detailed feature list see below)
- Pasting formatted text, e.g. from MS-Word (including tables)
- Converting the formatted text to wikicode
- Wikicode syntax highlighting
- Regular expression search and replace
- Server-independent Show preview and Show changes
- Fullscreen editing mode
- Single-click fixing of common mistakes
- History for summary, search, and replace fields
- Jump to selected heading
- Supports different languages
[modifier] Configuration nécessaire
- A Mozilla browser (Firefox 1.5 or higher, Mozilla 1.3 or higher, or SeaMonkey) (please help to make wikEd work in IE7 or Opera 9, drop me a note)
- A not too slow computer as wikEd might slow down the loading of long articles
- A user account on the wiki where you want to use wikEd
[modifier] Comment l'utiliser
Simply add one of the code snippet from below to your User:YourUsername/monobook.js page.
Check the wikEd help page for a description of all buttons.
[modifier] Fonctions
- (For a quick feature list see see above)
See also the wikEd help page for a description of all buttons and functions. wikEd adds the following functions as buttons below the edit textarea:
- Pasting formatted content, e.g. from MS-Word or MS-Excel
- Converting the formatted content to wikicode text (including tables)
- Paste and convert wiki pages without going to the edit page to get the source code
- Wikicode syntax highlighting
- Find and replace with case insensitive find and regular expression support
- Find ahead as you type
- Server-independent Show preview (uses Live Preview)
- Server-independent Show changes, uses User:Cacycle/diff for the color-coded visualization of deletions, additions, and block movements
- History for summary, find, and replace fields from drop-down menus (history is not lost between browser sessions and is accessible from different windows)
- Predefined and customizable summary texts
- Fixing common mistakes with one button:
- Fix Unicode character representations to either actual characters or character entities (depending on browser support status of character)
- Fix common typos using AutoWikiBrowser RegExTypoFix rules
- Mathematical and chemical formulas
- Basic — spaces and empty lines
- Dashes
- Units
- HTML — change html code to wikicode (including tables)
- Capitalization of headers and lists
- Jump to article headings from the find field drop-down menu
- Fullscreen editing mode
- All buttons have popup descriptions (titles)
- Hide <ref>...</ref> in-text reference tags
- Jump to position of last change
- Fully customizable, including button images and colors (via CSS)
- Intelligent selection of affected text, e.g. the word under the cursor or the current line
- Change the edit window font size
- Compatible with the existing edit toolbar above the edit box and the insert links below the edit box
- Can be disabled with a click without changing the monobook.js page
- Support for user-defined buttons and functions
[modifier] Traductions
See wikEd international for translations of wikEd and how to install them. wikEd has already been translated into:
- Chinese
- English
- German
- Italian
- Norwegian
- Portuguese
- Slovenian
[modifier] Boîte utilisateur wikEd
Coller le texte suivant dans votre page utilisateur :
{{Utilisateur wikEd}}
pour obtenir cette boîte :
Vérifier qui utilise cette boîte.
[modifier] wikEd info and navigation box
Every wikEd project page has a navigation box on top. You can add this template to an English Wikipedia page by adding the following code on top of the page text:
{{User:Cacycle/wikEd_template}}
wikEd Homepage · Discussion · Translations · Help |
The following code can be used for wikEd navigation boxes and templates on non-Wikipedia sites and non-English Wikipedia pages. The box uses external html links. If you are not on Wikipedia or another Wikimedia site like Wictionary or Wikinews, then you have to upload the logo WikEd_logo64x64.gif to your own wiki.
{| style="margin: 0 0 0.75em 0.75em; float: right; border-collapse: separate; border-spacing: 0;" |- style="background: #d4d0cc;" | style="padding: 0 0.5em 0 0.8em; border-top: white 1px solid; border-right: black 1px solid; border-bottom: black 1px solid; border-left: white 1px solid;" | <div style="position: relative; top: -0.5em;">[[Image:WikEd logo64x64.gif]]</div> | style="padding: 0 1.5em 0em 1.5em; border-top: white 1px solid; border-right: black 1px solid; border-bottom: black 1px solid; border-left: white 1px solid;" | [http://en.wikipedia.org/wiki/User:Cacycle/wikEd '''wikEd''' Homepage] · [http://en.wikipedia.org/wiki/User_talk:Cacycle/wikEd Discussion] · [http://en.wikipedia.org/wiki/User:Cacycle/wikEd_international Translations] · '''[http://en.wikipedia.org/wiki/User:Cacycle/wikEd_help Help]''' <br /> [http://en.wikipedia.org/wiki/User:Cacycle/wikEd_development Program documentation] · [http://en.wikipedia.org/wiki/User_talk:Cacycle/wikEd_development Developer discussion] · [http://en.wikipedia.org/wiki/User:Cacycle/wikEd.js Code] |}
[modifier] Known general issues
- If you are using an old computer or are editing very long articles, then you could speed up the page load by temporarily turning wikEd off by pushing the button. Alternatively, you could use wikEd's predecessor Cacycle editor (no longer actively maintained).
- wikEd relies on the browser-internal rich-text editor. This causes the following inconveniences:
- Syntax highlighting of freshly typed text has to be invoked manually by pushing the button. Until doing that the text may appear in a wrong highlighting color.
- Pasting text from a HTML heading generates a new paragraph with line breaks before and after the pasted text. These line breaks will disappear if you press an edit button, e.g. the textify button .
- Mozilla replaces tabs with four spaces when pasting text into the iframe. In order to keep the tabs you have to temporarily disable wikEd.
- A Mozilla browser bug sometimes leads to cursor jumps to the article start when editing pasted text or lets the cursor disappear.
- A Firefox browser bug under MacOS X requires the typing of a character into the edit box before deleting text.
- Be very careful when using the purple buttons and always check the diff for unanticipated changes. There are cases where the simple rules used for these buttons could damage an article.
- wikEd is incompatible with other scripts and extensions that rely on or change the text edit box (see the next section).
[modifier] Compatibilité
En générale, wikEd est incompatible avec les scripts, add-on, ou extension qui modifie 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.
[modifier] Scripts compatibles
[modifier] Scripts et add-ons incompatibles
- Topaz sectionsplitter script: the edit frame content disappears after a few milliseconds
- Zocky SearchBox: no crash, but it doesn't work
- Pilaf Live Preview: only works through the wikEd preview below buttons
- Pilaf InstaView: but integration into wikEd is in progress
- Wikipedia user scripts - editing, e.g. the Formatter script (may work with temporarily disabled wikEd)
- Where's sigContract: permanently deletes monstrous signatures from talk pages
- Wikipedia Firefox add-on: cursor (caret) navigation does not work. wikEd provides all functions of this extension, so it might simply be uninstalled.
- Linkification ≤ 1.3.3, linkifies the edit window even with having iframe as an excluded element (default) due to a Linkification bug. This causes the insertion of additional brackets around external links.
[modifier] Rendre un script compatible avec wikEd
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(); } }
[modifier] Non-Wikipedia wikis
In general, wikEd can be used on any MediaWiki installation, however, it must be a recent version (MediaWiki 1.8.2 works). In order for user scripts like wikEd to function the following line has to be added to the MediaWiki configuration file LocalSettings.php by an administrator:
$wgAllowUserJs = true;
The ultra-simple version from below for pasting the required code works only on Wikipedia, on other MediaWikis you have to paste the complete version. If you have problems to get it to work because of JavaScript errors (check the JavaScript Error Console in the Options menu of your browser) please post a message to the wikEd discussion page.
[modifier] Site-wide installation
wikEd can also be installed site-wide and can then also be used by not logged-in users. Administrators simply have to add the standard installation code (see below) to the MediaWiki:Common.js page of their own wiki.
[modifier] Installation
Suivez les instructions ci-dessous pour installer wikEd. Merci de ne pas copier le code complet de wikEd !
Voici les instructions pour installer wikEd sur la Wikipédia francophone :
- 1. connectez vous avec votre nom d'utilisateur
- 2. cliquez sur le lien suivant pour éditer votre page Utilisateur:VotreNom/monobook.js : Special:Mypage/monobook.js.
- 3. si vous n'utilisez pas le style Monobook (voir vos préférences) alors vous devez remplacer monobook.js par le style que vous utilisez. Exemple : Special:Mypage/cologneblue.js pour le style Cologne Blue (voir Aide:Monobook 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) // install the French translation for [[en:User:Cacycle/wikEd]] document.write('<script type="text/javascript" src="' + 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:Leag/wikEd-fr.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Cacycle/diff]] text diff code document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/diff.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Pilaf/Live_Preview]] page preview tool document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // install [[User:Cacycle/wikEd]] editing page extension document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
Si vous souhaitez utiliser un fichier de correction typographique, ajoutez ces lignes avant le code wikEd :
wikEdLoadRegExTypoFix = true; var wikEdRegExTypoFixSrc = 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:EDUCA33E/RegExTypoFix.js&action=raw&ctype=text/javascript&dontcountme=s';
où http://fr.wikipedia.org/w/index.php?title=Utilisateur:EDUCA33E/RegExTypoFix.js peut être remplacé par le fichier de votre choix.
-
- Si le code est déjà présent dans votre monobook.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.
[modifier] Troubleshooting / FAQ
[modifier] wikEd does not load
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:
- Refresh your browser cache: hold down Shift while clicking Reload (or press Ctrl-Shift-R)
- Enable JavaScript in your browser (Tools → Options → Content → Enable JavaScript in Firefox)
- Check under your preferences which skin you use. If you are not using the default skin Monobook then you have to replace monobook.js by the used skin, e.g. User:YourUsername/classic.js for the Classic skin
- Check the JavaScript Error Console (under Tools in Firefox) for error messages. If there is an error message caused by wikEd please report to the wikEd discussion page.
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:
- The custom button definitions have been changed in version 0.9.26 (February 23, 2007). If you use custom buttons, please update your custom button definitions (see below) on your monobook.js page. Disable JavaScript in your browser if you cannot edit pages.
For other problems see the wikEd help page.
[modifier] Customization
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 monobook.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.
[modifier] Customization examples
Show the button to fix common typos using AutoWikiBrowser RegExTypoFix rules:
var wikEdLoadRegExTypoFix = true;
Enable highlighting as followable links (use the right mouse button context menu to follow the link; not yet implemented):
var wikEdFollowHighlightedLinks = 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;
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';
[modifier] Custom buttons
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 monobook.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; }
[modifier] Theme packs
If you don't like the syntax highlighting colors or want to use other buttons - no problem, you could make your own theme pack (similar to the wikEd translation files by changing the wikEdMainCSS and wikEdFrameCSS style sheet definitions. You could also suggest improved colors on the talk page of this article so that they might be incorporated into the official release.
[modifier] Quelques données techniques
- Écrit en JavaScript
- Version 0.9.25 :
- 241 863 caractères
- 7 127 lignes
- 835 commentaires
[modifier] Internet Explorer and other browsers
wikEd does currently not work with Internet Explorer or other non-Mozilla browsers. However, the program uses only standard browser-independent JavaScript, so it should be relatively easy to tweak wikEd for MS Internet Explorer 7 and Opera 9. It would be really cool if you could help. Please drop a message on Cacycle's talk page or check the program documentation and the developer discussion.
[modifier] Bug reports
Please post your detailed bug reports to User_talk:Cacycle/wikEd (the discussion page of this article).
[modifier] Testimonials
Are you a happy user of wikEd? You can leave your testimonial here and let the world know how good it is:
- This programme is absolutely amazing. I use it on everything and it is so helpful, particularly the extension of pilaf's instaview. Thank you Cacycle so much for writing it! Dev920 (Have a nice day!) 13:53, 30 December 2006 (UTC)
- This looks like an outstanding tool, which I'm happy to give a test run. Thanks! Sandstein 21:30, 11 January 2007 (UTC)
- Outstanding work, Cacycle! This tool is like editing Wikipedia with Microsoft Word ;-) -- Tuvok^Talk|Desk|Contribs 23:59, 30 January 2007 (UTC)
- Thank you very much for this great gift! I personally don't need this tool, but I am certain that this tool will encourage others to contribute to my site in future. I have been looking for some thing like this ever since I started my MediaWiki site. I love the Wiki philosophy but the work load for the administrator is heavy due to its technical confusions, and I am certain that there many prospective contributors who are kept ashore due to the inconvenience. Thank you again for your work and generosity. --Kohyin 11:52, 9 February 2007 (UTC)
- Looks like I found what I was looking for! Thanks for that! I just installed it and added an abbreviated help without mayor problems (one crash of Firefox included, maybe because I copied the wikEd Logo) at the still very young site ZonaCostera.info --Horst Salzwedel 03:16, 15 February 2007 (UTC)
- I use it everyday. The syntax highlighting and reg-ex search and replace make it very valuable tool. Kudos! --Flex (talk|contribs) 17:20, 15 February 2007 (UTC)
[modifier] Who's using it?
The following table and the links therein give you an idea which users of Wikipedia are using wikEd:
Date | Version | English links search |
German links search |
Portuguese links search |
---|---|---|---|---|
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 |
Numbers are for correct installations as described above. Copying of the whole program is strongly discouraged and is not counted.
[modifier] wikEd is not
- WikEd, the wiki of the CTER program
- WikEd, a wiki plugin for the Vim editor
- WikEd, a Wikipedia username
[modifier] Copyright
« Moi, le créateur de cette œuvre, la place ici dans le domaine public. Cela vaut pour tous les pays. » Si cela n'est pas légalement possible : |