Extension:WikiEditor

From MediaWiki.org
Jump to: navigation, search
This extension is bundled with MediaWiki 1.18 and above. Thus you do not have to download it again.
MediaWiki extensions manual - list
Crystal Clear action run.png
WikiEditor

Release status: stable

VectorEditorBasic-en.png
Description Provides an extendable wikitext editing interface and many feature-providing modules
Author(s) Trevor Parscal, Roan Kattouw
Latest version 0.4 (2014-03-29)
MediaWiki 1.19+
License GPL v2
Download
README
Example Test Wikipedia
Parameters

$wgWikiEditorFeatures

Hooks used
EditPage::showEditForm:initial

GetPreferences
MakeGlobalVariablesScript
ResourceLoaderRegisterModules

Translate the WikiEditor extension if possible

Check usage and version matrix; code metrics
Bugs: list open list all report

The WikiEditor extension is an extendable framework with a set of feature-based modules that improve the user experience of editing. It is also the editing interface that Wikipedia currently uses.

Installation[edit | edit source]

  • Download and extract the files in a directory called WikiEditor in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Configuration[edit | edit source]

# Enables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
 
# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;
 
# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;

Add the above code at the bottom of your LocalSettings.php. In some situations, WikiEditor may not show in your browser after the installation. Clearing your browser cache will solve the problem.

Toolbar customization[edit | edit source]

See /Toolbar customization.

Extending[edit | edit source]

Toolbar Module[edit | edit source]

The WikiEditor.

A toolbar visible on editing pages which replaces the stock toolbar. See the toolbar icons.

Sections[edit | edit source]

Toolbar
The bold button tool.
Default select tools: Format, Insert, Special characters, Help

A toolbar is a series of groups, each with a series of tools, rendered in the writing direction of the content language, with visible dividers between groups.

Supported Tool Types

  • Button - an icon which can be clicked
  • Select - a drop-down list which can be selected from
Booklet
Loading help booklet

A booklet is a series of named pages which can be viewed one at a time and navigated through using an index list widget.

Supported Page Types

  • Table - a grid of columns and rows
  • Characters - a series of rectangular buttons containing text values

Actions[edit | edit source]

Each tool has an action which is executed when the tool is used. The most commonly used action is encapsulate, which operates on the currently selected text, prepending text, appending text and in the case that no text was selected inserting text at the cursor. The encapsulate action takes three parameters, pre, peri and post, which can either be raw text or message keys.

Raw Text Message Description
pre preMsg Text to place before the cursor/selection
peri periMsg Text to place at the cursor if there is no selection
post postMsg Text to place after the cursor/selection/peri text

Labs Modules[edit | edit source]

Part of the WikiEditor extension were a number of alpha quality modules. These alpha modules are now deprecated and are being removed. The modules are: highlighter, toc, templates and template editor. You should not be using them.

See also[edit | edit source]


Language: English  • Deutsch • 日本語 • русский