MediaWiki扩展:wikiwyg
天下维客,你可以修改的网络知识库
本文取自元维基,欢迎共同翻译、整理与大家共享,促进中文wiki发展^_^
This is a draft - You are asked to help to complete
The intention of this article is
- to get Wikiwyg run on a (any, my) MediaWiki-wiki
- to share this ability with others
*<a href="/wiki/Image:Wikiwyfdemo.gif" class="image" title="Image:wikiwyfdemo.gif"><img src="/images/8/81/Wikiwyfdemo.gif" alt="Image:wikiwyfdemo.gif" width="600" height="363" longdesc="/wiki/Image:Wikiwyfdemo.gif" /></a>
- 这是个用于firefox浏览器的插件,可以用于双击段落时直接跳出编辑框(页面不跳转)需要安装服务端和客户端插件才能使用,非常直观方便,对代码的影响很少。但是不适合一般用户使用,也不适合ie用户使用。--山姆皇帝 01:18 2007年3月20日 (CST)
目录 |
[编辑]
Wysiwyg-Editor "Wikiwyg" — how to launch on a Mediawiki
[编辑]
Setup for Firefox browser
- A standalone demo is at http://demo.wikiwyg.net/wikiwyg/demo/standalone/
This shows the impressing behaviour of the tool. No need for a Firefox extension. View the source-code:
The js-libraries and a DOM-function are incorporated into a html-file and work only on this file itself (no ajax-functionality). - A demo for Wikipedia you'll find at http://demo.wikiwyg.net/wikiwyg/demo/wikipedia/
Unfortunately this leads into a javascript-error by now (March 26, 2006).
It works! (Fixed Apr 18, 2006 – see below)
[编辑]
Resources needed
- Sources of the Wikiwyg project
Download moved to JSAN, at, http://openjsan.org/doc/i/in/ingy/Wikiwyg/index.html
| file | subdir | notes |
|---|---|---|
|
- Extension for Firefox
- Firefox browser (itself) (actual version: 1.5.0.1 - March 26, 2006)
- Greasemonkey extension (actual version: 0.6.4)
[编辑]
How to setup
- Edits to do on the Wikiwyg sources
- wikipedia.js
- Since this script targets on the Mediawiki system, a better name might be mediawiki.js
- Some lines "proto.config.markupRules..." may need a terminating ; (semicolon) instead of , (comma)
- The paths to the css-file and to the images may be customized.
- Since most of the images are gifs, the "imagesExtension:" might be '.gif' instead of '.png'
- wikipedia.user.js
- This demo-script targets on the Wikipedia. The name might change to <your-wiki-name>.user.js
- The suffix .user.js causes the Greasemonkey firefox extension to recognize the script as installable.
- The parameters at the top of the file, and the paths at the bottom have to be customized.
- Serverside – Wikiwyg sources
- Upload the Wikiwyg sources in a correct directory-tree
- (May this be beyond the wiki/extensions/-directory? Or must this be outside of the wiki-directory?)
- wikipedia.user.js (or renamed) needs not to be uploaded. But to do so and put a link to it in the wiki is a nice way to enable other users to quickly get benefit of wikiwyg.
- Clientside – Extension for Firefox
- Install the Greasemonkey-extension
- Open the URI of the (renamed) wikipedia.user.js
- Greasemonkey invites you to install this user-script
[编辑]
Call for bugfixing / Fixed!
-
Unfortunately, installing it all this way results yet into the same error as mentioned at the top (demo for Wikipedia).
- Some folks of the Wikiwyg-dev mailing list have fixed this (Apr 18, 2006):
Nicolas,<br />gugod has fixed this for the latest greasemonkey release.<br /> <a href="http://demo.wikiwyg.net/wikiwyg/demo/wikipedia/" class="external free" target="_blank" title="http://demo.wikiwyg.net/wikiwyg/demo/wikipedia/" rel="nofollow">http://demo.wikiwyg.net/wikiwyg/demo/wikipedia/</a> <br />Cheers, Ingy
- (The Error-message was:)
Javascript use failed: http:// ... /wikipedia.js [Exception... "Component is not available" nsresult: "0x8004011 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame:: <unknown filename>:: anonymous:: line 95" data: no]
[编辑]
How can the "Save"-function be enabled?
- Which code is to be amended to enable the save-function? In the demo for Wikipedia there is no save-code.
原文参见: wikiwyg


