Extension:WYSIWYG

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
WYSIWYG

Release status: unmaintained

WYSIWYG editor screenshot.png
Implementation Page action, Extended syntax, User rights, Skin, Ajax
Description Allows the easy insertion and enhanced editing of formatted data like tables, headings, enumerations etc. while they are displayed exactly like the final output.
Author(s) ontoprise GmbH
Latest version 1.7.0 (2012-04-25)
MediaWiki 1.16.x and
1.17.x only

user patched for later versions (see notes in download section)
Database changes No
License GPL
Download see the download section
Parameters

$wgDefaultUserOptions

Hooks used
ParserAfterTidy

EditPage::showEditForm:initial
EditPage::showEditForm:fields
EditPageBeforePreviewText
EditPagePreviewTextEnd
CustomEditor
LanguageGetMagic
ParserBeforeStrip
ParserBeforeInternalParse
EditPageBeforeConflictDiff
SanitizerAfterFixTagAttributes
MakeGlobalVariablesScript
GetPreferences
DoEditSectionLink
OutputPageParserOutput
BeforePageDisplay

Translate the WYSIWYG extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

The WYSIWYG extension enables a more intuitive editing of pages on a MediaWiki-based site. When this extension is installed, the tab 'Edit' in the command bar on top of every page leads directly in the wysiwyg editing mode.

It uses a special version of the CKeditor that outputs wiki text rather than the usual HTML that caused problems for MediaWiki integrations in the past.

Warning Warning: Be sure that you check the dependencies for this extensions. Other combinations will most likely fail.

Features of the WYSIWYG extension[edit | edit source]

The WYSIWYG extension supports the following:

  • importing / insertion of tables, images, formatting stuff like enumerations, font style etc. as well as links
  • real copy and paste without postprocessing
  • working with the known Word-like toolbar arrangement
  • using special characters
  • real time spell-checking with recommender function
  • undo/redo and find and replace functionality

Download[edit | edit source]

WYSIWYG (dependencies, download, help)
Ref
MediaWiki
PHP
MySql
Version from WYSIWYG.php Source
Notes
Browser
By
--
---
#x.1
1.17.x


1.6.0_0 [B8]
3.5 MB

1.6.0-0

http://sourceforge.net .... wysiwyg-1.6.0_0.zip





#x.2
1.17.x


1.7.0
3.5 MB

1.7.0-1

http://sourceforge.net .... wysiwyg-1.7.0_1.zip





#1
1.17


1.7.2
"WYSIWYG"
git.wikimedia.org repository (mirror in github repository: "wikimedia/mediawiki-extensions-WYSIWYG")

Wingsofcourage


#x.3

1.18.x

1.20.2



1.5.6_0 [B551]
2.5MB
wiki.linuxmatter.com .... User made (experimental)




#x.4
1.20.2
5.4.8

1.5.6_0 [B551]
WYSIWYG_MW_v1.20.2.zip

docs.google.com ... WYSIWYG_MW_v1.20.2.zip

User patched (PHP 5.4.8 compatible): almost identical to contents of #x.3, some SMWHalo part removed.





#2

1.20.7

1.20.8



1.7.0_2_PSA
"CKEditor in MediaWiki"

github.com repository: Ciges/CKEditor_in_MediaWiki

User made (beta). Patched versions of WikiEditor and WYSIWYG working together. Tested with 1.20.7 and 1.20.8 MediaWiki versions


Ciges


#3

1.21.1

5.4.8

1.5.6_0 [B551]
WYSIWYG_MW_v1.20.2.zip

docs.google.com ... WYSIWYG_MW_v1.20.2.zip (bundle is for MW1.20.2, same as #x.4 above))

For MediaWiki 1.21.1 make manually following modifications with it:

Patch #1 Remove (or comment) the two lines that contains wfLoadExtensionMessages( 'CKeditor' ); (probably line 345 and 532) in WYSIWYG/CKeditor.body.php and use these settings: Thread:Extension talk:WYSIWYG/Yes: Working with MW-1.21+ with some settings.

Patch #2: Fix one line in WYSIWYG/CKeditorLinker.php to prevent 404/Forbidden error when hitting CANCEL:





#4
1.22.0
5.5.3

1.5.6_0 [B551]
WYSIWYG_MV_v1.22.0.zip

drive.google.com ... WYSIWYG_MV_v1.22.0.zip

Works on MediaWiki 1.22.0.

User patched: Tested with IE10 and Chrome, Apache/PHP 5.5.3.

IE10, Chrome



#5
1.22.0
5.5.3

1.5.6_0 [B551]
WYSIWYG.zip
wikirouge.net .... WYSIWYG.zip[1](based on WYSIWYG_MV_v1.22.0.zip)

NOTE! Simple link does not work with MW 1.22 (browsers: IE11 / FireFox v26.0). More advanced category function + additional modifications in #6 (Riparap).


Varlin


#6
1.21.2, 1.22.0 - 1.22.7, 1.23.0 [2]
5.4.22 5.5.6
5.5.33 5.6.14
1.5.6_0 [B551]
WYSIWYG-CKeditor[3]
github.com repository: Mediawiki-wysiwyg/WYSIWYG-CKeditor. Based on #3 and #4 and also partly on #5 (does not include all modifications of #5). Includes additional fixes and modifications [4]. IE8[5], IE11[6], FireFox [7], Chrome [8]
Riparap























NOTE!

  1. Buttons to add a reference (footnote), button to add the [[...]] in one click when text link is target link, autofilling of the link dialog with selected text + autosearch, <math></math> tags aren't destroyed anymore by the parser.
  2. Should work, but is not fully tested. Latest WIKIEDITOR is not yet included with #6.
  3. Git -branch "CKeditor_v4" has updated CKeditor 4.4.0 (this branch has latest modifications). Branch "master" has older version 3.6 of CKeditor ("master" branch does not contain all the latest modifications).
  4. Reference- (new), category- (new) and image- (modified) dialogs. WikiEditor support with wysiwyg. Fixed some IE11 browser issues. Fixed double click of template icon "icon_template.gif". Fixed crash of tag- dialog (special.js). Fixed IE8 compatibility issues with bulleted list and reference -dialog "ref.js". Enabled wysiwyg in native mode of IE11. Fixed "source lang=xxx..." as own element with Tag-dialog (requires extension SyntaxHighlight_GeSHi). Fixed text format error on conflict page of MW. Fixed getNative() problem with IE in reference (ref.js) and category (category.js) dialogs. Integration with SF 2.7.
  5. IE7 is not compatible, IE browsers (IE8,9,10) should not have any compatible settings on for your wiki site.
  6. #6 bundle of wysiwyg should be used with IE11 native mode ("Edge"), compatibility view mode should not be enabled with IE11 for your wiki site (setting is located here: "Tools=>Compatibility View settings", deselect option "Display intranet sites in compatibility view" in case your wiki is internal or remove site name from the list).
  7. FireFox v26.0 - v30.0
  8. Chrome v.32.0.1700.76 m, v.33.0.1750.117 m

Installation on Mediawiki 1.17+[edit | edit source]

Warning Warning: The developer's site is no longer there, so instructions on installation were retrieved from Google cache and published here. Please use at your own risk.

-Quick note! When you extract the zip file you get a bunch of stuff that doesn't seem to be needed, copy the WYSIWSG folder from the extracted files into the extensions directory, then copy the code from below into LocalSettings.php Otherwise everything seems to break.

  • Download and extract the file(s) in a directory called WYSIWYG 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/WYSIWYG/WYSIWYG.php";
$wgGroupPermissions['*']['wysiwyg']=true; // for all users
#$wgGroupPermissions['registered_users']['wysiwyg']=true; // or only for registered users
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

MW 1.22 and #6 bundle of Download -section[edit | edit source]

For more information about proper settings of LocalSettings.php etc. with MW 1.22.x and #6 bundle, see README.md (on github -page).

Configuration[edit | edit source]

Customize the toolbar[edit | edit source]

Everything is explained here.

Disable for some namespaces[edit | edit source]

To disable the rich editor for some namespaces (for example, here Mediawiki), add the following code in your LocalSettings.php :

  $wgFCKEditorExcludedNamespaces = array(NS_MEDIAWIKI);

Style the content of the editor[edit | edit source]

Two solutions :

  1. Edit the file ckeditor/contents.css
  2. Point to the css file of your choice, adding this line to ckeditor/config.js :

config.contentsCss = 'path/to/your/file.css';

Improvements[edit | edit source]

Modifications :

  • One button to add the [[...]] in one click when text link is target link (incl. in #5 of Download section above)
  • Autofilling of the link dialog with selected text, and autosearch (incl. in #5)
  • One button to add a reference (footnote) (incl. in #5 and #6)
  • One button to add the <reference/> bloc (incl. in #5 and #6)
  • <math></math> tags aren't destroyed anymore by the parser (incl. in #5 and #6)
  • Fixed Images dialog (parameters) (incl. in #5 and #6)
  • Dialog to handle categories (incl. in #6)

Todo :

  • Make a dialog to handle math formulas
  • [//en.wikipedia.org wikipedia] is considered as internal link

Known incompatibilities with extensions[edit | edit source]

  • May not work if you use the FileLink extension
  • May not work with the HoverGallery extension

Development Repositories[edit | edit source]

If anyone is interested in developing the extension further, there are three known repositories created by users:

See the discussion/talk page to get in touch with the owners of these repositories.