Extension:VEForAll/ja

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 " ") that can be called by other extensions on their textareas. At the moment,, and  can make use of VEForAll.

当然のことですが、この拡張機能を動作させるためには、VisualEditor 拡張機能をインストールする必要があります.

ダウンロード
You can download the VEForAll code, in .zip format, here.

また、MediaWiki のソース コード リポジトリから Git 経由で直接ダウンロードすることもできます. コマンドラインから、以下のように呼び出せます:

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:

Using VEForAll with other extensions
VEForAll can currently be used with the, and  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  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. . 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.

設定
既定では、ツールバーはテキストエリアの下部に表示されます. In Page Forms, you can instead display it at the top by adding  to the textarea's tag in the form definition.

You can use the "VEForAllToolbarConfigNormal" and "VEForAllToolbarConfigWide" hooks to customize the display of the VisualEditor toolbar. One or the other hook is called, depending on whether "toolbarOnTop" is set: "Normal" is called if it is not set, and "Wide" if it is.

For example, to add buttons for "Insert > Math formula", "Insert > Images and media", and "Cite" in the normal (toolbar on the bottom) case, add the following to LocalSettings.php, below the inclusion of VEForAll:



既知の問題点
一部の外装では、ドロップダウンがかなり圧縮されて表示される場合があります. CSS を少し修正することで、これを解決できます:



作者とクレジット情報
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.



バージョン履歴

 * 0.1 - - Initial version
 * 0.2 - - 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 - - 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 - - Improved support for MW 1.34+; removed support for MW < 1.32; fixes for pipe escaping