User:Cacycle/wikEd

NEW: wikEd runs automatically on every MediaWiki wiki when installed as a Greasemonkey user script! Install — Info


 * Please help to make wikEd work in IE7 and Opera 9, see the developer documentation and discussion.

wikEd is a full-featured Wikipedia-integrated text editor that adds enhanced text processing functions to edit pages. Currently it works only for Firefox and other Mozilla browsers. wikEd is a complete rich-text pseudo-WYSIWYG editor and comes with many MediaWiki-specific features. Check the wikEd help page for a description of all functions and buttons.

Quick features


Screenshot



 Recent changes The newest update is on top. For archived updates see the change log
 * wikEd 0.9.44d Fixed MS Internet Explorer crashes and wikEd re-enable bug. Cacycle 02:06, 25 September 2007 (UTC)
 * wikEd 0.9.44 Made usable as a Greasemonkey user script, updated diff.js and wikedDiff.js, uploaded bundles Greasemonkey version, added wikEdWikifyTableParameters, fixed find bug. Cacycle 04:02, 24 September 2007 (UTC)
 * wikEd 0.9.43 Fixed table import "<" leftover bug, changed regexps ending in "*/" to "*/", fixed Ajax preview on non-Wikipedia sites. Cacycle 01:46, 15 September 2007 (UTC)
 * wikEd 0.9.42 Added accesskeys (alt-shift-b: wikify; alt-shift-o: textify; alt-shift-g: scroll to edit field). Redirect button: removed link formattings including heading. Basic fix button: fixed consecutive headings bug. Interlanguage links: fixed highlighting for dash-containing languages. Improved MS Word import (0.9.41a). Cacycle 04:11, 10 September 2007 (UTC)
 * wikEd 0.9.41 Fix Dashes button fixed, see the wikEd Help section. Cacycle 02:56, 7 September 2007 (UTC)
 * wikEd 0.9.40 RegExTypoFix button now supports the template to exclude text from typo fixing. Cacycle 03:05, 5 September 2007 (UTC)
 * wikEd 0.9.39 The RegExTypoFix function now uses the main rule list at AutoWikiBrowser/Typos. Please use the new  to enable the RegExTypoFix button. Cacycle 03:44, 2 September 2007 (UTC)
 * wikEd 0.9.38a Fixed bugs: template highlighting, spaces on line start after pasting, fix basic newlines into lists, fix basic removes now all spaces in empty lines. Removed lang attributes for MS Word pasting. Added caching of the editing frame on leaving the page, fix html tag parameters are now accepted without quotation marks. 0.9.37a-f: fixed regexp left search wrap around, Twinkle compatibility fixes, clickable links: underscores and % fixed, colon allowed in links, wikify of links fixed, allowed comments before blocks for highlighting.Cacycle 02:50, 19 July 2007 (UTC)
 * wikEd 0.9.37 Streamlined button bars (8 buttons removed!) and improved search/replace logic with new "find selected text" buttons. Cacycle 03:44, 26 May 2007 (UTC)
 * wikEd 0.9.36 Links and wikilinks in the edit text can be opened by Ctrl-clicking. Cacycle 00:25, 16 May 2007 (UTC)


 * (For a more detailed feature list see below)


 * Wikicode syntax highlighting
 * Pasting, import, and conversion of formatted text, e.g. from Microsoft-Word and web pages
 * Regular expression search and replace
 * Edit preview and show changes on the same page without reloading
 * Fullscreen editing mode
 * Single-click fixing of common mistakes
 * History for summary, search, and replace fields
 * Jump to selected heading
 * Type-ahead find
 * Support for many languages
 * Improved diff display
 * Follow links and wiki-links (ctrl-click)
 * Runs automatically on every MediaWiki installation when installed as a local Greasemonkey user script

System requirements

 * 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, check the developer documentation and discussion)
 * A user account on the wiki where you want to use wikEd
 * A not too slow computer as wikEd might slow down the loading of very long articles
 * A screen resolution higher than 1024×786 is preferred in order to keep the button bars in one row, but it works fine with any resolution
 * If used outside Wikipedia, then the wiki installation must be a recent version of MediaWiki (1.8.2 works, see Toolbox >> Special pages >> Version).

How to use it
Simply add one of the code snippets from below to your User:YourUsername/monobook.js page.

Check the wikEd help page for a description of all buttons. For a local installation as a Greasemonkey user script see below.

Features

 * (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
 * Quick Show preview, displays a local preview using InstaView that is replaced by a server preview using Ajax techniques
 * Quick Show changes, uses User:Cacycle/diff for the server-independent 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   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
 * Automatic installation of new versions (using Ajax)
 * Support for user-defined buttons and functions
 * Improved diff display on Show Changes as well as history comparison pages (using wikEdDiff)
 * Internal and external links in the edit text can be opened (ctrl-click)
 * Keyboard shortcuts for buttons
 * Runs automatically on every MediaWiki installation when installed as a local Greasemonkey user script
 * Automatic update function

Translations
See wikEd international for translations of wikEd and how to install them. wikEd has already been translated into:


 * Chinese
 * English
 * French
 * German
 * Hungarian
 * Italian
 * Japanese
 * Norwegian
 * Polish
 * Portuguese
 * Slovak
 * Slovenian

wikEd userbox
If you're on Wikipedia, paste the following text to your user page:

to get this userbox:



Check who is using this box.

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:

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 Wiktionary or Wikinews, then you have to upload the logo WikEd_logo64x64.gif to your own wiki.

Known general issues

 * wikEd works currently only with Firefox or other Mozilla-based browsers (please help to make wikEd work in IE7 or Opera 9, check the developer documentation and discussion)
 * 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 [[Image:wikEd_logo.png]] 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 [[Image:wikEd_syntax.png]] 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 [[Image:wikEd_textify.png]].
 * 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).

Compatibility
In general, wikEd is incompatible with any script, add-on, or extension that relies on or changes the text edit box. The reason is that wikEd replaces the normal text area with its own rich-text iframe. Many of these scripts will still work if wikEd is temporarily turned off by pressing the button, making the changes, and re-enabling wikEd.

Compatible scripts

 * Lupin Navigation popups
 * AzaToth Twinkle

Incompatible scripts and add-ons

 * Topaz sectionsplitter script: the edit frame content disappears after a few milliseconds
 * Zocky SearchBox: no crash, but it doesn't work
 * Pilaf Live Preview, but wikEd uses the Live Preview successor InstaView for previews
 * Pilaf InstaView: only works through the wikEd preview below buttons
 * 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. Linkification functionality has been added to wikEd.
 * Alex_Smotrov's QPreview, but the QPreview functionality has been added to wikEd
 * MediaWiki LinkedImages Extension

Making scripts compatible with 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; } }

Installation
wikEd can not only be used on every language Wikipedia, but also on any MediaWiki wiki installation, however, it must be a recent version (MediaWiki 1.8.2 works).

Greasemonkey
wikEd runs automatically on every MediaWiki wiki when installed locally as a Firefox and SeaMonkey Greasemonkey user script.


 * 1) Install Greasemonkey for Firefox or Greasemonkey for SeaMonkey (does not need xSidebar)
 * 2) Install wikEd by clicking this link and completing the installation popup window
 * 3) Optional: wikEd can be customized by adding user settings to the code, but these settings will be overwritten by updates
 * 4) The version information (hover over the wikEd logo on top of the page) has an "GM" added when wikEd runs as a Greasemonkey script. A wiki-installed version always takes precedence over the Greasemonkey version.

Non-Wikipedia wikis
In order for user scripts like wikEd to function as a wiki user script (monobook.js installation), the following line has to be added to the MediaWiki configuration file LocalSettings.php by a server administrator (a site-wide installation does not need this setting):

$wgAllowUserJs = true;

If you get an error message similar to

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 279876 bytes) in /server-path-to-your-wiki/includes/Parser.php on line 496

then the following value in php.ini has to be increased from its default value to at least 32 MB by a server administrator:

memory_limit = 32M

Use the "complete version" of the installation code from below — the ultra-simple version works only on Wikipedia because it uses a template. 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.

Site-wide installation
wikEd can also be installed site-wide and can then also be used by not logged-in users. A wiki sysop (admin) or bureaucrat has to add the the "complete version" of the installation code from below to the MediaWiki:Common.js page of their wiki. The script can then be used without allowing the users to run their own monobook.js JavaScript code. The  is not required for a site-wide installation.

Installation code
Simply add one of the following code snippets to your User:YourUsername/monobook.js (or whatever skin used, see Monobook for details) page. You need a user account and you have to be logged in in order to install and use wikEd. Both installation versions give identical results. After saving, you have to refresh your browser's cache to see the changes: hold down Shift while clicking Reload (or press Ctrl-Shift-R). Please do not copy the complete wikEd program code to your page in order to get the frequent updates and bug fixes and to save disk space (but see wikis without internet connection).

Ultra-simple version
This works only for installations on the English Wikipedia:


 * 1) Log in under your username
 * 2) Click the following link to edit your User:YourUsername/monobook.js page: Special:Mypage/monobook.js
 * 3) If you are not using the default skin Monobook (see your preferences) then you have to replace monobook.js in the page name by the used skin, e.g. User:YourUsername/cologneblue.js for the Cologne Blue skin (see Monobook for details)
 * 4) Add the following code to that edit page:    If there is already code on your User:YourUsername/monobook.js page, please make sure not to paste the wikEd line between   ...  ,  ... , or /*...*/ tags.
 * 5) The ultra-simple version expands to the complete version (see below) upon previewing or saving the page
 * 6) Save the page
 * 7) Refresh your browser's cache: hold down Shift while clicking Reload (or press Ctrl-Shift-R)
 * 8) The wikEd logo [[Image:wikEd_logo.png]] should now be displayed on top of every page next to the log out link

Complete version
This is the real installation code that works for all MediaWiki installations:


 * 1. Log in under your username
 * 2. If you are on the English Wikipedia click the following link to edit your User:YourUsername/monobook.js page: Special:Mypage/monobook.js, otherwise open the respective page by hand
 * 3. If you are not using the default skin Monobook (see your preferences) then you have to replace monobook.js in the page name by the used skin, e.g. User:YourUsername/cologneblue.js for the Cologne Blue skin (see Monobook for details)
 * 4. Add the following code to that edit page:

// install User:Cacycle/wikEd in-browser text editor document.write('');


 * If there is already code on your User:YourUsername/monobook.js page, please make sure not to paste the installation code between /*...*/ tags.
 * 5. Save the page
 * 6. Refresh your browser's cache: hold down Shift while clicking Reload (or press Ctrl-Shift-R)
 * 7. The wikEd logo [[Image:wikEd_logo.png]] should now be displayed on top of every page next to the log out link

Wikis without internet connection
If your wiki users do not have internet access, e.g. in an intranet, you can still use wikEd. This is the only case were it makes sense to copy the whole wikEd program code to another page.


 * Make sure that a server administrator has made the following settings (as described above):
 * (per-user installation) and/or  (for all installation) in LocalSettings.php
 * in php.ini
 * Copy the whole wikEd program code from the page wikEd.js to the page wikEd.js on your wiki
 * Copy the whole diff program code from the page diff.js to the page diff.js on your wiki
 * Copy the whole InstaView program code from the page instaview.js to the page instaview.js on your wiki
 * Copy the respective translation page (see User:Cacycle/wikEd_international) to the page wikEd_translation.js on your wiki if needed
 * Download all wikEd images from Commons:Category:wikEd (more than 100!)
 * Upload the images (do not change the image names):
 * Either into one directory on a server accessible on your intranet (easier, but needs FTP access to that server)
 * Or upload all images manually onto your wiki using the Upload file page (more work)
 * Decide were to save the installation code on your wiki:
 * If you want to load wikEd by default for everybody, then save the installation code to the page MediaWiki:Common.js on your wiki
 * If you want to load wikEd on a per-user basis, then save the installation code to the template Template:wikEd — users can then install wikEd simply by adding  to their User:USERNAME/monobook.js page.
 * Save one of the two following installation codes to that place, depending on how you have uploaded the images:
 * This installation code is for images in one single directory:

// define images var wikEdUseLocalImages = true; var wikEdImagePathLocal = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-IMAGES/';

// disable auto update var wikEdAutoUpdate = false; // diff script URL var wikEdDiffScriptSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=diff.js&action=raw&ctype=text/javascript';

// wikEdDiff script URL var wikEdDiffSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=wikEdDiff.js&action=raw&ctype=text/javascript';

// InstaView script URL var wikEdInstaViewSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=instaview.js&action=raw&ctype=text/javascript';

// install the wikEd translation (omit if no translation needed) document.write('');

// install in-browser text editor document.write('');


 * This installation code is for images manually uploaded onto the wiki:

// define image path var wikEdImagePath = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-IMAGES/';

// disable auto update var wikEdAutoUpdate = false;

// diff script URL var wikEdDiffScriptSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=diff.js&action=raw&ctype=text/javascript';

// wikEdDiff script URL var wikEdDiffSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=wikEdDiff.js&action=raw&ctype=text/javascript';

// InstaView script URL var wikEdInstaViewSrc = 'http://YOUR-DOMAIN.WHATEVER/PATH-TO-YOUR-WIKI/index.php?title=instaview.js&action=raw&ctype=text/javascript';

// install the wikEd translation (omit if no translation needed) document.write('');

// install in-browser text editor document.write('</' + 'script>');


 * Change YOUR-DOMAIN.WHATEVER to your domain name
 * Change PATH-TO-YOUR-WIKI to the web-accessible path to your wiki (usually w)
 * Change PATH-TO-YOUR-IMAGES to the web-accessible path to your images (usually wiki/images)


 * Protect the program code pages ending in ".js" from editing — this is very important for security reasons:
 * A wiki sysop (admin) or bureaucrat has to click the "protect" tab on top of wikEd.js and wikEd_translation.js and change "Edit" and "Move" to "Block all non-admin users" and enter JavaScript security as the reason.
 * Make sure to update the wikEd code pages regularly as the code is under constant development and you will not receive any bugfix or new feature automatically.

Troubleshooting / FAQ
This section focuses on getting wikEd to work. For other problems see the wikEd help page.

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)
 * If you are using wikEd on a non-Wikipedia installation check if $wgAllowUserJs is has been set to true in the MediaWiki initialization file LocalSettings.php by an administrator
 * 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. Alternatively you can paste the following line into your browser's address bar to open the right page: javascript:void(document.location='/wiki/Special:Mypage/'+skin+'.js')
 * 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.

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. Their default definitions look like:

// initial text zoom for edit window (percentage) var wikEdTextZoom = wikEdTextZoom || 100;

or (for boolean values):

// find ahead as you type checkbox preset if (typeof(wikEdHighlightSyntaxPreset) == 'undefined') { var wikEdFindAheadSelected = true; }

All customizations must be placed before the wikEd installation block. Customizations for wikEd as a Greasemonkey script must be added to the program code and will be overwritten by updates. They must be added in the form

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

var wikEdRegExTypoFix = true;

Use different RegExTypoFix rules. This address must have the exact same domain name as the used wiki. On the French Wikipedia you could use:

var wikEdRegExTypoFixURL = 'http://fr.wikipedia.org/wiki/en:Wikipédia:AutoWikiBrowser/Typos?action=raw';

Disable ctrl-clickable followable links in edit text:

var wikEdFollowLinks = false;

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 title'] = '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;

Display a button to automatically append "…using wikEd" (or another text) to the edit summaries: var wikEdShowUsingButton = true; var wikEdSummaryUsing = '…still using wikEd';

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 (and remember to clear the browser cache afterwards by pressing Shift-Reload):

// 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 ( /&amp;lt;div&amp;gt;(.*?)&amp;lt;\/div&amp;gt;/i.test(obj.changed.plain) ) { obj.changed.plain = obj.changed.plain.replace(/&amp;lt;div&amp;gt;(.*?)&amp;lt;\/div&amp;gt;/gi, '$1'); }

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

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

return; }

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.

Technical details
Statistics (version 0.9.44):


 * Programming language: JavaScript
 * 303,257 characters
 * 8521 lines
 * 1019 comments

Internet Explorer and other browsers
wikEd does currently not work with Internet Explorer or other non-Mozilla browsers. However, the program uses 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.

Bug reports
Please post your detailed bug reports to User_talk:Cacycle/wikEd (the discussion page of this article).

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 ;-) -- <font color="#ffcc66">Tuvok <font color="#ffffff">^ <font color="#99ccff">Talk <font color="#ffffff"> 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! --Fl e x (talk|contribs) 17:20, 15 February 2007 (UTC)
 * Excellent work, I will use this and install it on all my MediaWiki sites. Nilamdoc 12:37, March 26, 2007
 * Really handy tool. Love the search and instant-preview features.  Saintrain 15:05, 1 April 2007 (UTC)
 * I love it! It makes editing 90% easier! <font color="Red" face="Arial Rounded MT Bold">Ry <font color="Blue" face="Arial Rounded MT Bold">Guy  15:47, 5 April 2007 (UTC)
 * So impressed I installed it site wide. Good power editing tools. Graham 09:26, 13 April 2007 (UTC)
 * This is a great tool - I think I've been using it for about a month now, and I have to say the syntax highlighting is one of the best features. Thanks for all the effort that you've put into making it! -Panser Born-   (talk)  21:18, 17 May 2007 (UTC)
 * This probably significantly increased my Wikiing --Thinboy00 talk&#124;contribs 00:17, 23 June 2007 (UTC)

Who's using it?
The following table and the links therein give you an idea which users of Wikipedia are using wikEd:

Numbers are only for correct installations as described above (follow "link" in the title cell and do not count links from non-skin.js pages).

wikEd is not

 * WikEd, the wiki of the CTER program
 * WikEd, a wiki plugin for the Vim editor
 * WikEd, a Wikipedia username

Copyright
fr:Utilisateur:Leag/wikEd hu:Wikipédia:WikEd it:Wikipedia:Monobook.js/WikEd pt:Wikipedia:Software/Scripts/wikEd no:User:Dvyjones/wikEd