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.
wikEd |
---|
Installation |
wikEd diff |
Program code |
Project |
Gadgets |
|
Translations |
|
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.
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, you can paste formatted text: links stay links, tables stay tables, strange text formatting stays as it is. Any such formatting will be stripped from the article if you submit the page and only the raw text will stay. You can also get rid of text formatting by pressing 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 fullscreen 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 occured 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
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 |
Selection, word under cursor, or cursor position | |
Nowiki | 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 Cite error: The opening <ref> tag is malformed or has a bad name (see the help page). 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 | |
Weblink | Adds or removes an external weblink ([...]). | 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|widthpx|...]]. | 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 | Sorts lines alphabetically. Sorting is case independent and numerically correct. It sorts by the finally displayed text, ignoring link targets, wikicode, and non-word characters. When sorting tables, the cells of a table row are moved together as a block. | Lines under selection or paragraph under cursor | |
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 |
Find and replace buttons
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 dropdown 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 dropdown 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. This does not affect the type ahead search which always finds plain text. 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. Find ahead is independent of the Case sensitive and RegExp check buttons and always searches case insensitive. |
Fix buttons
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 ° and À 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+ + OH- + H2SO4 --> 2 h2o + Na2SO4 is replaced by 2Na+ + OH- + 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 wikEdRegExTypoFix = true; to your monobook.js page before the wikEd installation code, otherwise the button will not be shown (see wikEd installation).
|
Selection, otherwise whole text |
wikEd control buttons
This setting of the toggle buttons is stored in a cookie and affects all newly opened pages.
Icon | Name | Description |
---|---|---|
Top Row | ||
Toggle [REF] and [TEMPL] hiding | Toggles the "newbee" 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 (feature broken in Firefox 3.5). 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 | Toggles the wikEdDiff mode to display an improved changes view on diff pages. This setting affects all new diff pages and is stored for future browser sessions. | |
Fullscreen | Toggles the fullscreen mode. This setting affects all new pages and is kept for future sessions. Fullscreen mode is disabled for preview pages. |
Preview and changes
Icon | Name | Description |
---|---|---|
Preview | Shows a preview below the editing area. This function first renders a local preview using the independent script InstaView by Pilaf. The function then connects to the server using Ajax techniques and replaces the local preview with one that looks exactly like a real preview on a new page. The local preview works fine for basic formatting, but cannot resolve {{templates}}. The button next to the Preview submit button scrolls the edit field to the top while the preview buttons on the wikEd toolbars to the right scroll the preview box to the top. | |
Changes | Shows the current changes below the editing area. This uses the diff program by Cacycle. 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. The button next to the changes submit button scrolls the edit field to the top while the buttons on the wikEd toolbars to the right scroll the preview box to the top. |
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 distuinguishable 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 | |
-
|
Normal hyphen | U+00A0 |
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
wikEd is slow
Sometimes you can experience delays in edit page loading and some slow wikEd functions, especially on long pages and slow computers.
The most time consuming procedure is syntax highlighting. You can turn off syntax highlighting by pushing the button.
Other time consuming functions include edit buttons for whole text selections and regular expression searches ( button). Do not use these functions on long pages.
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. 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')
- 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.
Custom buttons installed, wikEd crashes
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.
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. 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. 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.
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 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, including mouse operations. This might not even be possible, would bloat the program, and would render the browser's undo/redo menu entries useless. 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 editor.
While this sounds like a good idea at first, it is actually a step backwards. It would be very simple to add WISYWYG 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. This can be seen in the true WYSIWYG editor implementation FCKEditor (copy the text from a typical Wikipedia article and click Rich Editor).
wikEd tries to bring together the best of both worlds in something also known as WYSIWYM – what 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
See also:
- What you see is Wiki - Questioning WYSIWYG in the Internet Age
- FCKEditor for MediaWiki, a true WYSIWYG implementation (edit the Sandbox, click Rich Editor)
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 (please help to make wikEd work in IE7 and Opera 9, see the developer documentation and discussion)
Please post bug reports or feature requests to the wikEd discussion page.