Jump to content

User:Cacycle/wikEd: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
rm outdated System requirements
Line 46: Line 46:


See [[User:Cacycle/wikEd_installation|wikEd installation page]] for more details. That page also explains how to install '''wikEd''' on non-Wikipedia wikis and on wikis without internet connection and how to [[User:Cacycle/wikEd_installation#Creating a gadget|create a wikEd gadget]].
See [[User:Cacycle/wikEd_installation|wikEd installation page]] for more details. That page also explains how to install '''wikEd''' on non-Wikipedia wikis and on wikis without internet connection and how to [[User:Cacycle/wikEd_installation#Creating a gadget|create a wikEd gadget]].

== System requirements ==

* Browser: Firefox 1.5 or higher, Mozilla 1.3 or higher, SeaMonkey, WebKit, Google Chrome, or Safari
* 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.{{quantify}}
* A screen resolution higher than 1024×768 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 ==
== How to use it ==

Revision as of 16:52, 28 January 2012

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 is a full-featured Wikipedia-integrated advanced text editor for regular to advanced wiki users. wikEd features syntax highlighting with code check and reference and template folding, on-page Show preview and Show changes, and advanced search and replace functions. Please check the wikEd help page for details. wikEd works under all web browsers except Internet Explorer and Opera.

Quick features

Screenshot

Screenshot of wikEd in action

(For a more detailed feature list see below)
  • Syntax highlighting with code check and reference and template folding
  • Comfortable search and replace with regular expression support and type-ahead find
  • On-page Show preview and Show changes
  • Pasting, import, and wiki code conversion of formatted text, e.g. from Microsoft-Word and web pages
  • Open links and wiki-links with a ctrl-click
  • Fullscreen editing mode
  • Single-click fixing of common issues and mistakes
  • Works for every MediaWiki and has been translated into many languages

Installation

How to install wikEd (chose one option):

  • Gadget—The easiest option on the English Wikipedia (not available on every wiki):
    Select wikEd on the Gadgets panel of your wiki preferences
  • User script—If wikEd is not a gadget on your wiki:
    Paste a small code snippet to your User:YourUsername/monobook.js page (details)
  • Site wide—Wiki administrators can install wikEd on their own wiki for all users:
    Paste a small code snippet to your MediaWiki:Common.js page (details)
  • Greasemonkey—Works for every Wikipedia language and wiki, even if not logged in:
    Install the Greasemonkey add-on for Firefox from here, then install wikEd by clicking here

See wikEd installation page for more details. That page also explains how to install wikEd on non-Wikipedia wikis and on wikis without internet connection and how to create a wikEd gadget.

How to use it

Simply check wikEd under the Gadget section in your Wikipedia preferences. Alternatively (and if your wiki does not have this option), add one of the code snippets from below to your User:YourUsername/monobook.js page. If you have Greasemonkey installed, you can install wikEd by clicking here.

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

For more information, see below or check the wikEd installation page.

Full features

(For a quick feature list see above)

See also the wikEd help page for a description of all buttons and functions. wikEd adds the following functions as buttons above the edit textarea:

  • Pasting formatted content, e.g. from web pages, other wiki pages, MS-Word, or MS-Excel
  • Converting the formatted content to wikicode including tables
  • Wikicode syntax highlighting, based on a real JavaScript wikicode parser
  • Find and replace:
    • Case insensitive and regular expression support
    • Find ahead as you type
    • Find and/or replace all occurrences
    • Find and replace history
  • On-page Show preview
    • Immediate local preview using InstaView
    • Replaced by a background server preview (using Ajax)
  • On-page improved Show changes:
    • Improved inline format (additions and deletions in a continuous text)
    • Uses server-independent User:Cacycle/diff
    • Detects and displays text block moves
  • Intelligent and persistent Edit summary field history
    • Predefined and customizable summary texts
  • Fixing common mistakes with one button:
    • Fixing wiki links with redirects to final target article (Ajax)
    • 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
  • Article navigation: jump to headings from the find field drop-down menu
  • Fullscreen editing mode
  • All buttons have popup descriptions (titles)
  • Alphabetical sorting of lines and link lists
  • Hide <ref>...</ref> in-text reference tags, {{..}} templates, and character entities (such as &nbsp;)
  • Fully customizable via CSS and configuration settings
  • Intelligent selection of affected text, e.g. the word under the cursor, the current line, or the current paragraph
  • Font size zoom for edit box
  • Compatible with the standard editing toolbars
  • Simple click dynamic main switch (logo next to the logout link)
  • Automatic update and installation of new versions
  • Support for user-defined buttons and functions
  • Runs on the following pages: normal edit, file upload, and edit raw watchlist
  • Improved diff display on version comparison pages (using wikEdDiff)
  • Internal and external links in the edited text can be opened in a new tab or window with a ctrl-click
  • Keyboard shortcuts for buttons
  • Template and parser function highlighting for template developers
  • Can be installed as a gadget, user script, site script, or Greasemonkey script
    • Runs on every MediaWiki installation when installed in the browser as a Greasemonkey script
  • Fully translated into many languages

Translations

See wikEd international for translations of wikEd and how to install them. wikEd has been translated into Arabic, Chinese, Czech, Dutch, Esperanto, Finnish, French, Galician, German, Hebrew, Hungarian, Italian, Japanese, Korean, Lower Sorbian, Malay, Norwegian, New Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, Sicilian, Slovak, Slovenian, Spanish, Swedish, Turkish, Upper Sorbian, and Vietnamese. Detailed instructions on creating new translations can also be found on the wikEd international page.

wikEd userbox

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

{{User:Cacycle/wikEd userbox}}

to get this userbox:

This user edits with the gadget wikEd.


Check who is using this box.

Known general issues

  • wikEd does currently not work in Internet Explorer and Opera, but this will probably change soon with the upcoming standards-compatible versions of these browsers
  • If you are using an old computer or are editing very long articles, then you can speed up page loading by temporarily disabling the syntax highlighting by pushing the Syntax highlighting button or by temporarily turning wikEd off by pushing the wikEd logo button.
  • wikEd relies on the browser-internal rich-text editor and uses formatted text (similar to MS Word or Outlook). This causes the following inconveniences:
    • Syntax highlighting of new and changed text has to be invoked manually by pushing the Textify button (see Firefox feature request).
    • Pasting text from HTML headings generates new paragraphs with line breaks before and after the pasted text. These line breaks will disappear if you press the textify button Textify.
    • Firefox replaces tab characters with spaces in iframes. In order to keep tabs you have to temporarily disable wikEd using the wikEd logo button.
  • Be very careful when using the purple fixing buttons and always check the Show changes functions for unanticipated changes. There are cases where the simple rules used for these buttons can damage articles.
  • wikEd is incompatible with certain scripts and extensions that rely on or change the original text edit box (see the next section).

Compatibility

Browser support

wikEd works under Firefox, SeaMonkey, Safari, WebKit, and Google Chrome, but not yet under the currently not standards-compatible Internet Explorer and Opera.

Skin support

wikEd works with all native MediaWiki skins and most of their derivatives. Other supported skins include:

  • Vector (upcoming default skin)
  • Pinkwich5 (Citizendium)
  • Monaco, Quartz, Searchwikia, Oasis (Wikia)
  • Cavendish, Devmo (wiki.mozilla.org, developer.mozilla.org)
  • Gumax [1]
  • Pixeled [2]

Scripts, add-ons, and extensions

In general, wikEd is incompatible with scripts, add-ons, or extensions that rely on or change the standard text edit box. The reason is that wikEd replaces the normal text area with its own separate 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. It is possible to make scripts compatible with wikEd (see below).

Compatible scripts

This is a short and incomplete list of scripts and gadgets that are compatible with wikEd:

Incompatible scripts, add-ons, and extensions

This is a short and incomplete list of scripts and gadgets that are not compatible with wikEd:

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();
    }
}

A more sophisticated way to apply local changes similar to custom button handlers is shown below. The example implements a "<div>...</div>" add or remove function around selected text:

// this example code adds or removes div tags around the selected text

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 your changes to the plain target text in obj.changed.plain

// 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
  obj.changed.keepSel = true;

// return to WikEdEditButton() to apply changes
  return;
}

if (typeof(wikEdUseWikEd) != 'undefined') {
  WikEdEditButton(null, null, null, TestHandler);
}

You can also add your custom functions to hooks that are executed on events such as wikEd setup, wikEd turned on or off, and classic textarea or wikEd frame turned on. It is also possible to directly apply changes to the wikEd edit frame, please see the wikEd development page.

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 (ToolsOptionsContentEnable 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.

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}}

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.

{| 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|64px]]</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]
|}


wikEd Homepage · Discussion · Translations · Help
Program documentation · Developer discussion · Code


Customization

wikEd is fully customizable, including color schemes, language, and custom buttons and functions. Please see the wikEd customization page on how to adapt wikEd to your personal preferences.

Internet Explorer and other browsers

wikEd does currently not work with Internet Explorer and Opera, but work is in progress to change that. Please check the program documentation and the developer discussion for the progress and to see how you can help.

Bug reports

Please post your detailed bug reports to User_talk:Cacycle/wikEd (the discussion page of this article). Please use the bug reporting form on top of the page and add your report to the bottom of the page.

Testimonials

Who's using it?

The following search link gives you an idea which users of the English Wikipedia are loading wikEd through their monobook.js page: Search Wikipedia. A list of testimonials of users can be found (and edited!) under wikEd testimonials.

wikEd is not

All wikEd-related code and Wikipedia article content is released into the public domain: