Manual:External editors

MediaWiki 1.5 and later allows you to edit any resource using any external tool. This is accomplished using a very simple system:


 * 1) When a resource is requested for being edited externally, MediaWiki sends out a control file that contains information about the resource; most importantly, its network location (URL) and the interface that is to be used for changing it. See Manual:External editors: control files for the specifications.
 * 2) User browser has to be configured to call a special helper application (see below).
 * 3) That helper application processes the control file, retrieves the resource, launches the favored application to edit it, and, if desired, saves the resource back to the server.



啟動外部編輯== == 鏈出在您的個人喜好，您可以設置外部編輯，默認編輯操作：首選項→編輯→“使用外部編輯器默認”.

但更為實用的方法是增加一個額外的選擇，使用特殊的 externaledit =真正的“/特”鏈出的URL參數. *您可以使“外部編輯鏈接”出現在所有網頁旁邊通常的修改鏈接，加入外部編輯器腳本你的 monobook.js文件. *您也可以成立一個特別書籤在您的瀏覽器：創建一個新的書籤/收藏夾並複製到這個網址字段： ：的的


 * Opera: via Tools→Preferences→Advanced→Downloads
 * In Internet Explorer you can try to associate helper application with .php file extension

ee.pl
There is a reference implementation for the helper application called ee.pl (available here, see README for usage and INSTALL for setup instructions). It is written in Perl and may be difficult to set up. However, it provides a complete set of features. Developers are welcome to write a more user friendly implementation. You may also need Windows XP or Ubuntu tips.

Note that the ee.pl GUI makes it very easy to save the data back to the server, including an edit summary, or to cancel the edit. You can also make multiple edits on the server by using the "Save and continue" button.

Please make sure you are using the latest version of the script if it is not working as expected.

For each wiki you want to use ee.pl with, add an entry like this to ee.ini:

[] URL match= Username=(MyUsername) Password=(MyPassword)

This is necessary so people can log in -- it does not know your password otherwise! Note that if you are active on many wikis, such as multiple Wikipedia languages editions, and you use the same username and password, you can simply use something like "wikipedia.org" or "wikimedia.org" with this authentication information as the URL match pattern (or indeed ".org" if you only intend to access these sites). An example generic entry:

[Generic] URL match=edia.org Username=(MyUsername) Password=(MyPassword)

Less is more! Just using  or   is sufficient, whereas adding the whole URL often causes an error.

If you want to edit files, you need to use something like  because files are on that host.

ee.pl as Java helper application
A version of this ee.pl script is available here as a Java application. It is still in development but the basic functions are working. These are 'Authentication at the Wiki', 'Download of the file', 'Open of the file with the standard application' and 'Upload the file back to the Wiki'. The Java GUI should once be a extended copy of the ee.pl script GUI.

If opening the Java helper app directly, the ini file it asks for is the same file as used by the ee.pl script above, called ee.ini. Copy that ini file and use it - for Windows users, the program addresses must be in the format below, pointing to wherever the program is, such as: svg="C:\Program Files\Inkscape\inkscape.exe" or if in user space: svg="C:\Documents and Settings\Owner\My Documents\Inkscape\inkscape.exe"

WSH implementation
There is implementation called ExtEdit written using Windows Script Host. It does not save articles to the server directly but launches your browser instead.

Alternatives
Several Mozilla Firefox extensions provide another way to use external text editor, see Wikipedia:Text editor support. Particularly, for Linux users, the use of It's All Text is a much simpler procedure to invoke an external editor than what described above (particularly when some helper application such as ee.pl, written in Perl, "may be difficult to set up").