This page is a translated version of the page Extension:VEForAll and the translation is 53% complete.
Other languages:
Manual ekstensi MediaWiki
OOjs UI icon advanced-invert.svg
Status rilis: stabil
Deskripsi Menetapkan fungsionalitas JavaScript untuk membolehkan ekstensi lain memasukkan VisualEditor ke dalam area teks mereka
Perancang awal Pierre Boutet, Clément Flipo, Ike Hecht, Yaron Koren and Cindy Cicalese
Versi terbaru 0.4 (November 2021)
Kebijakan kompatibilitas Master maintains backward compatibility.
MediaWiki 1.32+
Perubahan basis data Tidak
Composer mediawiki/v-e-for-all
Lisensi Lisensi Publik Umum GNU 2.0 atau lebih baru
Terjemahkan ekstensi VEForAll jika tersedia di translatewiki.net

Periksa matriks penggunaan dan versi.

Masalah Tugas terbuka · Laporkan kekutu

The VEForAll ("VisualEditor For All") extension allows other extensions to incorporate the VisualEditor interface into textareas for user editing.

This extension does not directly impact the user interface. Rather, it defines a JavaScript function (called "applyVisualEditor()") that can be called by other extensions on their textareas. At the moment, CommentStreams , Page Forms and FlexForm can make use of VEForAll.

As might be expected, the VisualEditor extension must be installed for this extension to work.


You can download the VEForAll code, in .zip format, here.

You can also download the code directly via Git from the MediaWiki source code repository. From a command line, you can call the following:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/VEForAll

You can also view the code online here.


To install this extension, create a 'VEForAll' directory (either by extracting a compressed file or downloading via Git), and place this directory within the main MediaWiki 'extensions' directory. Then, in the file 'LocalSettings.php', add the following line:

wfLoadExtension( 'VEForAll' );

Menggunakan VEForAll dengan ekstensi lain

VEForAll can currently be used with the CommentStreams , Page Forms and FlexForm extensions:

  • For CommentStreams (version 4.5 or higher), you simply need to have VEForAll (and VisualEditor) installed, and then textareas for entering comments will automatically get the VisualEditor interface.
  • For Page Forms (version 4.7 or higher), in the form definition, add |editor=visualeditor to the tag for any textarea input (including the "free text" input), and the VisualEditor interface should show up when viewing that form.
  • For FlexForm, use editor="ve" when defining a textarea. E.g. <_input type="textarea" editor="ve"></_input>. You can have as many VE editors on a page as needed and you can even add a menu/button to the VE Editor that will open another VE Editor.


By default, the toolbar is display at the bottom of the textarea. In Page Forms, you can instead display it at the top by adding |class=toolbarOnTop to the textarea's tag in the form definition.

You can use the "VEForAllToolbarConfigNormal" hook to customize the display of the VisualEditor toolbar. For example, to add "math" and "media" buttons, add the following to LocalSettings.php:

$wgHooks['VEForAllToolbarConfigNormal'][] = function( &$defaultConfigNormal ) {
        $defaultConfigNormal[4]['include'][] = 'math';
        $defaultConfigNormal[4]['include'][] = 'media';

Known issues

In some skins, the dropdowns may look rather compressed. You can apply a small CSS tweak to fix this:

table.multipleTemplateInstanceTable {  	border-collapse: inherit; }

Penulis dan kredit

VEForAll is heavily based on the (now-obsolete) VEForPageForm extension by Pierre Boutet and Clément Flipo. Some work to make the code more generic was done by Ike Hecht, Yaron Koren and Cindy Cicalese. Others who contributed to the code include Anysite and Mark Hershberger. VEForAll also includes code from the StructuredDiscussions extension.

Riwayat versi

  • 0.1 - (2018-05-03) - Initial version
  • 0.2 - (2020-02-07) - Made toolbar configurable; removed dependency on the Math extension; fixed submitting values for "focused" textareas; set VE direction (RTL/LTR) correctly; added "veForAll.targetCreated" hook; many other fixes
  • 0.3 - (2021-05-05) - Improved support for MW 1.35+; removed support for MW < 1.29; added handling for Page Forms "max height" parameter; added escaping of pipes in table wikitext within Page Forms template fields; bug fixes
  • 0.4 - (2021-11-03) - Improved support for MW 1.34+; removed support for MW < 1.32; fixes for pipe escaping