Langbahn Team – Weltmeisterschaft

User:Cacycle/wikEd help

Please support wikEd

Please support wikEd by helping to fix the following browser and MediaWiki issues.

  • Firefox:
    • 579763, 579760 Cursor/caret disappears (07-2010)
    • 1016372 Space lost when deleting text (05-2014)
    • 926230 Space at end of line not styled (10-2013)
    • 543204 Focus after search (01-2010)
    • 926164 Editor deletes blank before inserted block element when converting to text (10-2013)
    • 458524 Automatic syntax highlighting would interfere with undo/redo. The only reason why wikEd does not have automatic syntax highlighting. (10-2008)
  • Webkit/Chrome:
    • None.

This is the help page for wikEd, a full-featured in-browser text editor that adds enhanced text processing functions to Wikipedia and other MediaWiki edit pages.

Please post bug reports or feature requests to the wiked discussion page.

Screenshot of wikEd

Enabling and disabling wikEd

Re-enabling wikEd

To disable or re-enable wikEd, click the grayed out wikEd logo displayed the very top right of any wiki page, right next to the Log out link (not available on the user Preferences pages).

Quick tutorial

Most buttons will work as expected and resemble those in your regular text processing program. However, wikEd is sometimes a bit special. This is largely because the program uses the browser's built-in rich-text editing interface (more details can be found below). wikEd is launched immediately when [edit] is clicked on any article, provided that you have it correctly installed, it is not disabled, and you use a supported browser.

Formatted text

Unlike in the standard editing window, when you paste formatted text, links stay links, tables stay tables, and strange text formatting stays as it is. Any such formatting will be stripped from the article when you save the page (only the raw text will be kept) unless you convert the formatting (see next section). If you want to get rid of text formatting prior to saving the page, you can press the textify button .

Converting to wiki code

If you want to keep a certain formatting, a link, or a table, you can convert the formatted pasted text into wiki code by pushing the wikify button . Any editing button will automatically wikify the text to be changed.

Updating the syntax highlighting

For technical reasons, the syntax highlighting cannot be updated automatically. If you add text, it might therefore be displayed in a wrong color or formatting. Simply push the textify or wikify button to update the syntax highlighting. This also updates the targets for internal and external links in the text (ctrl-click to open them in a new window or tab).

Most buttons (including the three previous ones) work on the whole text if no text is selected and on the selection only if you have text selected.

Control buttons

The button bar to the right has the control buttons. With these buttons you can switch between the standard editing window and wikEd, turn off syntax highlighting, turn off the standard toolbar, or switch to full-screen mode. If you push any of these buttons, its setting will be saved in a cookie and it affects all new pages and is kept for future sessions.

Buttons explained

wikEd main switch, version info, and error indicator

The following wikEd status indicator logos below are displayed at the top of the page next to the logout link. Hovering over the logo gives you the current version info. wikEd checks every 20 h for updates and automatically updates. You can check for the latest version and update manually by pressing Shift and click the Reload button or press Shift-Ctrl-R (technically, updating is simply a page reload after clearing the browser's cache for this page).

Icon Name Description
Enabled Use this button to disable wikEd. This will disable wikEd for all browser windows and for all future browser sessions. Click the logo again to re-enable wikEd. wikEd will currently not load if the wiki database is locked or a page is protected. Pressing this button erases the undo history.
Disabled This icon will be displayed if wikEd is disabled. Press the icon to re-enable wikEd.
Load error If an error has occurred while loading and initializing wikEd you will see this icon instead. You can check the JavaScript console under the Tools menu of your browser for an error message and report this to the wikEd discussion page.

Collapsing button bars

The button bars above the edit window have a grip area to collapse them. This can be useful with low screen resolutions like 600×800 or 1024×768 pixels:

Click the grip to collapse the bar. Move the mouse cursor over the grip to expand the bar temporarily. Click the grip again to re-expand the bar.

Formatting buttons

The formatting buttons appear on the left, directly above the text editing area.
The textify buttons, needed to update syntax highlighting and to import and convert pasted text
Icon Name Description Affected Region
Top Row
Undo Undo text changes. Pushing this button is equivalent to using the undo shortcut (Ctrl-Z under Windows). Whole text
Redo Redo text changes. Pushing this button is equivalent to using the redo shortcut (Ctrl-Y under Windows). Whole text
Bold Adds or removes bold text formatting ('''...'''). Selection, word under cursor, or cursor position
Italic Adds or removes italic text formatting (''...''). Selection, word under cursor, or cursor position
Underline Adds or removes underline text formatting (<u>...</u>). Selection, word under cursor, or cursor position
Strikethrough Adds or removes strikethrough text formatting (<s>...</s>). Selection, word under cursor, or cursor position
No-wiki Adds or removes nowiki text formatting (<nowiki>...</nowiki>). Selection, word under cursor, or cursor position
Superscript Adds or removes superscript text formatting (<sup>...</sup>). Selection, word under cursor, or cursor position
Subscript Adds or removes subscript text formatting (<sub>...</sub>). Selection, word under cursor, or cursor position
Ref Adds or removes an[1] in-text reference (no text selected: <ref></ref>; text selected: <ref>. . .</ref>). Shift-click adds or removes a named in-text reference (no text selected: <ref name=""/>; text selected: <ref name="">. . .</ref>). Selection or cursor position
Case Toggles between lowercase, Title Case, and ALL UPPERCASE. Selection or word under cursor
Undo all Restores the original version. Whole text
Redo all Restore the latest version. Whole text
Bottom Row
Link Adds or removes an internal wiki link ([[...]]). Selection, word under cursor, or cursor position
Web link Adds or removes an external web link ([...]). Selection, word under cursor, or cursor position
Heading Increases heading level(s). Adds =...=. No new headings are created for multi-line selections. Shift-click decreases the heading level. Current or selected line(s)
Bullet list Converts item(s) to a bulleted list by adding a leading *. Shift-click removes leading *. Current or selected line(s)
Number list Converts item(s) to a numbered list, adding a leading #. Shift-click removes leading #. Current or selected line(s)
Indent list Convert item(s) to an indented list, adding a leading :. Shift-click removes leading :. Current or selected line(s)
Def list Converts item(s) to a Definition list, adding a leading ; and a : after the first word. Current or selected line(s)
Image Adds a wiki image. Inserts [[Image:filename|thumb|width px|...]]. Word(s) under selection or cursor position
Table Adds a table. Selected lines are converted into table cells. Selected line(s) or cursor position
References Adds or removes the references section placeholder (<references/>).
Shift-click adds a Wikipedia References section header followed, on a separate line, by the placeholder (== References == / <references/>).
Cursor position
Sort Sort alphabetically. Sorting is case independent and numerically correct. It sorts by the finally displayed text, ignoring link targets, wiki-code, and non-word characters. When used on a single line, it sorts table cells or list items (separated by bullets, dots, dashes, the characters \|/-,;: enclosed in spaces, the characters ,;: followed by spaces, or just spaces). It keeps the wikicode for template parameters, table rows, and lists. When used on multiple lines, it sorts whole lines and keeps the cells of a table row together. Current line, selection in line, or lines under selection
Redirect Applies the redirect code (#REDIRECT [[...]]) to the selection or the words under the cursor. Adds the redirect code to the summary. Deletes all text. Words under selection
Icon Name Description Affected Region
Wikify Wikify pasted content. Converts content pasted from sources like Word, Wikipedia article pages, or other web pages to wiki code. Pasted heading text will be converted into normal text, only headings at the start of a line will be converted into wikicode headings. Also updates the syntax highlighting. Keyboard shortcut: Shift-Alt-B (or Ctrl-Shift-B, depending on browser). Selection, otherwise whole text
Textify Converts pasted content to plain text. Strips any formatting from content that has been pasted from sources like Word or web pages and leaves only the visible text. Also updates the syntax highlighting. Keyboard shortcut: Shift-Alt-O (or Ctrl-Shift-O, depending on browser). Selection, otherwise whole text

Find and replace buttons

The find and replace buttons appear to the right of the formatting buttons, directly above the text editing area.


Icon Name Description
Top Row
Find all Highlights all matches in the whole text but does not scroll the text.
Find prev Finds a previous match by searching backwards.
Find & jump The text to be searched for. The drop-down options contain the last submitted searches, preceded by ◊ or ♦ as indicators for the case sensitive and regular expression settings used. Selecting a previous search also sets the Case sensitive and RegExp check buttons.

If the Find ahead button is checked, the text will be searched for and selected while you type into this field (case insensitive and non-regular expression search).

If this field is empty, the find buttons searches for the selected text or the word under the cursor. The Clear find button can be used to empty this field.

You can jump to an article heading by selecting one of the headings after ⇒ from the drop down options. This does not change the find field.

Use the Tab key to jump between the Find and the Replace fields.

Find next Finds the next match by searching forward.
Selected prev Find the selected text backwards without changing the find field. If no text is selected it selects the word under the cursor.
Selected next Find the selected text forwards without changing the find field. If no text is selected it selects the word under the cursor.
Bottom Row
Replace all Replace all matches in either the selected text or the whole text.
Replace prev Replace previous match. This button first highlights the backwards searched match and replaces it after the next button push.
Replace The replacement text. The drop-down options contain the last submitted replacements, proceeded by indicators for the used casesensitive and regular expression settings. Selecting a previous replacement also sets the Case sensitive and RegExp check buttons.

Use the Tab key to jump between the Find and the Replace fields.

Replace next Replace the next match. This button first highlights the forward searched match and replaces it after the next button push.
Case sensitive Toggle the case sensitive search setting. This does not affect the type ahead which always finds case insensitive.
RegExp Toggle the regular expression search setting. The JavaScript regular expression syntax is used. In the replace text the following placeholders can be used: $1, $2... (to reference parenthesized substring matches), \n (newline), \r (return), \t (tab), \127 (octal char), \x1f (hexadecimal ASCII char), and \u12ef (hexadecimal Unicode char). \\, \', and \" are equivalent to \, ', and ".
Find ahead Toggle the find ahead as you type setting. If checked the find text is automatically searched for and selected while typing the find phrase.

Fix buttons

The Fix buttons appear to the right of the Find & Replace buttons, directly above the text editing area.


After using these buttons always check the changes with the button for unexpected collateral damage. Always use the smallest possible selection. Keep in mind that the applied rules are very simple. Only the Unicode character fixing is completely safe.

Icon Name Description Affected Region
Top Row
Fix basic Adds blanks around headings and adds empty lines. This increases the source text readability but does not affect the rendered article. This is also done by most other fixing functions, with the exception of the Unicode character fixing. Selection, otherwise whole text
Fix html Replaces html code in the article with the equivalent wiki code. Not supported html tags and tag parameters are removed. Selection, otherwise whole text
Fix caps Capitalizes headings and lists. Selection, otherwise current paragraph
Fix Unicode Fix Unicode character representations to either actual characters or character entities, depending on the browser support status of the character. E.g. it converts &deg; and &#192; into the actual character °. This is a safe fix button, changes can be applied to the whole text without checking the result. Selection, otherwise whole text
Fix all Combines the previous four buttons into one and fixes basic, html, capitalization, and Unicode. Selection, otherwise whole text
Fix redirects Checks links if they are redirects and fixes them to their final targets. The original link text is kept after the "|". The function connects to the server using Ajax techniques. Please read About fixing redirects and Do not "fix" links to redirects that are not broken why this should be used carefully. Selection, otherwise whole text
Bottom Row
Fix dashes Fixes to the correct dash characters for em-dashes, en-dashes, hyphens, and minus signs. Removes spaces around em dashes, adds spaces around en-dashes, and converts html character entities into dash characters, -- to em dashes, dashes before numbers into a minus sign, and dashes to en dashes in dates. Selection, otherwise current paragraph
Fix punctuation Deletes spaces before punctuation. Selection, otherwise current paragraph
Fix math Fixes some common math issues outside of the <math> wikitag: minus signs, multiplication sign ×, 10^3 to 103, and +/- to ±, and Unicode to html tag superscripts. Selection, otherwise current paragraph
Fix chem Fixes unformatted chemical formulas. Super- and subscripts indices, uppercases elements, and fixes reaction arrows. Use only on small text selections. Example: 2 Na+ + 2 OH- + H2SO4 --> 2 h2o + Na2SO4 is replaced by 2Na+ + 2OH + H2SO4 → 2H2O + Na2SO4. Selection, otherwise current line
Fix units Correct a large number of physical units. The units have to be preceded by a number. Selection, otherwise current paragraph
Fix typos Fix common typos using AutoWikiBrowser RegExTypoFix rules. To use this function you have to add var wikEdConfig = {}; wikEdConfig.regExTypoFix = true; to your common.js page before the wikEd installation code, otherwise the button will not be shown (see wikEd installation). Selection, otherwise whole text

wikEd control buttons

The control buttons appear on the right, directly above the text editing area.


This setting of the toggle buttons is stored and affects all newly opened pages. Hovering over the background gives the version info, similar to main switch on top of the page.

Icon Name Description
Top Row
Toggle [REF] and [TEMPL] hiding Toggles the "newbie" mode that hides references (<ref>...</ref>) under REF tabs and multi-line templates under TEMPL tabs. When hovering over these tabs the hidden content unfolds for editing. This setting affects all new pages and is kept for future sessions.
Text zoom Changes the edit window text zoom. Cycles through small, very small, very large, and large back to normal. Shift-click cycles in the reverse direction.
Clear history Clears the find, replace, and summary history by deleting the cookies used to store these values.
Source Display the source code of pasted content or of syntax highlighted text. This is mainly for testing purposes. Affects the current selection or the whole text. This button is disabled by default, see the customization examples for how to enable it by adding var wikEdShowSourceButton = true; to your settings.
Scroll to preview Scrolls the page so that the preview field is at the top. Keyboard shortcut: Shift-Alt-G (or Ctrl-Shift-G, depending on browser).
Scroll to edit Scrolls the page so that the edit buttons are at the top.
Bottom Row
Use wikEd Toggles between classic text area and wikEd. Switches temporarily back to the 'standard' text editing area. This setting is kept for all windows during the current browser session. Pressing this button erases the undo history.
Syntax Toggles automatic syntax highlighting. This setting is kept for all windows during the current browser session. Syntax highlighting also makes internal and external links followable (ctrl-click).
Table mode Work in progress! Toggles table mode editing to use the browsers built-in table editing feature. This button is currently disabled by default and has to be enabled by adding var wikEdShowTableModeButton = true; to your settings.
Close toolbar Toggles the classical non-wikEd toolbar. This setting affects all new pages and is kept for future sessions.
…Using Toggles the automatically addition of "…using wikEd" to summaries on submitting the page. This setting affects all new pages and is kept for future sessions. This button is disabled by default, see the customization examples for how to enable it by adding var wikEdShowUsingButton = true; to your settings.
wikEdDiff Automatically opens the wikEdDiff field on version difference pages to display the improved changes view. This setting affects all new diff pages and is stored for future browser sessions.
Full-screen Toggles the full-screen mode. This setting affects all new pages and is kept for future sessions. Full-screen mode is disabled for preview pages.

Preview and changes

The standard submit buttons with the wikEd preview and changes buttons
A group of buttons to the right, above and below the (hidden) preview box
Icon Name Description
Preview Shows a preview below the editing area. Double clicking on any preview area or pushing the Scroll to edit field button scrolls to the edit field while the Scroll to preview field button scrolls to the preview area.
Changes Shows the current changes below the editing area. This is not identical to the standard Changes button because it does not check against the last saved article version but only for changes made after the last page load. Double clicking on any changes area or pushing the Scroll to edit field button scrolls to the edit field while the Scroll to preview field button scrolls to the changes area. This function uses the wikEd diff library.
Icon Name Description
Scroll to preview Scrolls to the preview field.
Scroll to edit Scrolls to the edit field. Equivalent to double clicking on any preview or changes area (either standard or wikEd) or the keyboard shortcuts Shift-Alt-G (or Ctrl-Shift-G, depending on browser).
Close Closes the preview area box used for the Preview and Changes functions.

Summary field

Icon Name Description
Clear summary Removes the current summary text. Any leading paragraph name (/*...*/) is retained, but is also removed after a second button click.
Summary This is the normal edit summary field that now has a drop-down history. In the upper part you can choose from recent summary field entries. The most recent ones are at the top. In the bottom part you can choose from several user-defined phrases (check wikEd customization for instructions on how to change these). The selected text(s) are appended to the currently entered text. Leading paragraph names (/*...*/) are removed from the history.

Syntax highlighting of special characters

wikEd highlights certain special Unicode characters so that they are distinguishable from their standard versions. Hover over the highlighted character for their name.

Highlighting Name Unicode
Tab U+0009
En space U+2002
Em space U+2003
Thin space U+2009
Ideographic space U+3000
-
Normal hyphen U+002D
­
Soft hyphen U+00AD
Figure dash U+2012
En dash U+2013
Em dash U+2014
Horizontal bar (quotation dash) U+2015
Minus sign U+2212
Highlighting Name Comment



Unsupported tag Unknown or Mediawiki-deprecated HTML tag. Use the Fix html button to convert these into wiki code.

Troubleshooting

Double edit notice

This is a wikEd feature that duplicates edit notices and warnings from the top of edit pages right above the editing area in order to make them visible after wikEd's automatic scrolling to the edit area. This feature can be disabled using the wikEd.config.doCloneWarnings = false; customization setting; please see the wikEd customization page for details.

wikEd is slow

On very slow computers or when using outdated browsers, it is possible to experience delays when editing extremely long articles. In these cases you can can turn off syntax highlighting by pushing the button. Also, you might want to avoid edit buttons for whole text selections and regular expression searches (RegExp button).

wikEd does not load

You have followed the installation instructions on the main page, 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 (ToolsOptionsContentEnable JavaScript in Firefox)
  • If installed as a user script on a User:YourUsername/your_skin.js page make sure that you are using the right skin or move the loading code to User:YourUsername/common.js, see wikEd installation
  • 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 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.

All wikEd buttons are gone

The wikEd logo on top of the page is displayed in grey and the wikEd buttons are not shown on edit pages.

  • You have disabled wikEd by clicking the logo on top of the page. Click the logo again to re-enable wikEd.

The wikEd formatting buttons are gone

The wikEd control buttons are displayed on edit pages, but all other button bars are gone.

  • You have temporarily disabled wikEd by clicking the control button above the edit field. Click the button again to turn wikEd back on. Please remember that the setting of this button is saved and kept for all windows and tabs.

Error: invalid range in character class

You have installed wikEd by pasting the complete code to your wiki. wikEd does not load at all and the browser's error console shows the following error: "Error: invalid range in character class". When you check the header text of the copied wikEd code for the following sentence: "The code has to be saved as UTF-8 in your editor to preserve Unicode characters like ♥ (heart)" the "♥" symbol is replaced by a "?".

The reason is that you lost the Unicode character formatting when copying the code to your wiki. Use a UTF-8-capable text editor when you paste the code to your wiki and specify UTF-8 as your file format when you save your text file.

Greasemonkey update messages

If you experience repeated update messages without being able to actually update, then you might have two competing duplicate versions of wikEd installed.

Solution: Please go to Firefox Tools - Add-ons - wikEd (no version number) and click remove. Then update or reinstall wikEd by clicking here.

FAQ

Can I have only some wikEd features

Can I have only some wikEd features, e.g. only syntax highlighting, no syntax highlighting, only the search functions?

There is no easy way to get only some wikEd features as most features are highly interdependent. However, wikEd is configurable and you could try to set the respective presets (e.g. no syntax highlighting), see the customization section. Experienced programmers could try to dissect or to remove certain features, but such a version would not be updated automatically with bugfixes and new features. Feel free to suggest new configuration options on the wikEd talk page after having used wikEd for a few days (to get the feeling...).

Missing features and other shortcomings

Automatic syntax highlighting

A common feature request is the automatic updating of the syntax highlighting while typing ("live syntax highlighting").

This cannot be easily implemented for technical reasons. Every automatic change to the edit frame either erases or messes up the undo history. In order to get live syntax highlighting, the whole undo/redo system and the whole editing logic of the browser's rich text interface would have to be simulated from scratch in JavaScript. Please see this Firefox bug report and vote for it.

WYSIWYG

Please also read an extended user essay about this under User:Cacycle/WYSIWYG (under construction)

A common feature request is to make wikEd a true WYSIWYG (/ˈwɪziwɪɡ/ WIZ-ee-wig)[2] editor.

While this sounds like a good idea at first, it is actually a step backwards. It would be very simple to add WYSIWYG for the basic formatting like bold or italic. But for even slightly more advanced formatting, things turn complicated:

  • A true WYSIWYG editor has to hide and encapsulate any existing wikicode from direct editing
  • Therefore, images, tables, templates, wiki links, external links, and even simple span or div tags with parameters, need a separate (popup) editor to edit their hidden content
  • Pasting formatted text screws up formatting, especially the heading order
  • Existing, syntactically incorrect text on the page can disappear from editing, and, in the worst case, get lost on saving and/or corrupt the existing article text

Under real-world conditions with typical wiki content, WYSIWYG editing is more confusing and time consuming than the simple wiki-way of structure-oriented editing.

wikEd tries to bring together the best of both worlds in something also known as WYSIWYMwhat you see is what you mean:

  • A simple (MS Word-like) user interface with advanced text editing features like search and replace (also good for learning the wiki code)
  • The structure-oriented classic text field, peppered up with syntax highlighting and on-page preview
  • Text editing without any popup forms

See also:

wikEd design philosophy

The design philosophy of wikEd is:

  • Simple, small, and intuitive user interface (no navigation through complex menu structures, no popups, special buttons must be added as plugins)
  • Cross site compatibility between all MediaWiki installations (not only Wikipedia)
  • Multi-language support
  • Multi-browser support by using cross-browser standards-compatible code
  • Use of the browser-internal rich-text editor

Please post bug reports or feature requests to the wikEd discussion page.

Non-breaking spaces

WikEd will convert an otherwise invisible non-breaking space into its HTML reference (&nbsp;) when the user enters edit mode, automatically. This edit only converts ones that are present—it does not insert new ones. Such non-breaking spaces are usually inserted unintentionally by a previous editor. A subsequent edit can or should remove them (according to WP:NBSP).

Notes

  1. ^ Used for demonstration of the Ref button:   .
  2. ^ "Dictionary.com Unabridged (v 1.1)". Retrieved 9 November 2007.