Mediawiki-wysiwyg / WYSIWYG-CKeditor

Mediawiki extension: WYSIWYG. Includes extension and other components required by it
GNU General Public License v3.0
67 stars 34 forks source link

WYSIWYG-CKeditor

This is modified extension of MediaWiki: WYSIWYG -editor. This bundle includes WYSIWYG extension and other modifed components related to it. Files of this bundle were originally taken from diffrent source bundles of extension WYSIWYG from MediaWiki site www.mediawiki.org. You can find results of this work here (http://github.com/Mediawiki-wysiwyg).

More information about MediaWiki extension WYSIWYG can be found here:

http://www.mediawiki.org/wiki/Extension:WYSIWYG

http://www.mediawiki.org/wiki/Extension_talk:WYSIWYG


NOTE!

You will use this bundle in your environment at your own risk. The authors of this package can not be held responsible for any issues this bundle may cause in your system.


It is always nice to hear comments about use of this extension. You can leave your comments here:

http://www.mediawiki.org/wiki/Extension_talk:WYSIWYG


You can find information about following issues below:

================


History of modifications:


Origin of source bundles combined into this version:

  1. Version of WYSIWYG files were taken intially for MW 1.21 from here:

    https://docs.google.com/file/d/0B-aiZzKTmWI2bG8yVzBCOWNLamM/view?pli=1 WYSIWYG_MW_v1.20.2.zip

  2. Some modifications have been adapted into it from here:

    https://drive.google.com/file/d/0B-aiZzKTmWI2Q0wyd3FMRVpuZWM/view?pli=1 WYSIWYG_MV_v1.22.0.zip

  3. Some additinal features were developed based on this bundle

    http://wikirouge.net/nowiki/mediawiki/WYSIWYG

  4. Additional features, modifications and fixes where applied on top of bundles above.

========================

Short installation instructions:


Supported languages:

More translations are wellcomed (files mediawiki/plugin.js, mwtemplate/plugin.js; for details see git issues "French added")


Compatible MediaWiki environment:


File: LocalSettings.php

Make sure your LocalSettings.php has been set up properly, certain name spaces should be excluded from wysiwyg by default and some of the other settings should be in specific way for wysiwyg and wikieditor to work together. Activation of wysiwyg -extension using require_once( ... ) should be the last of all extensions in your LocalSettings.pgp so that wysiwyg will know all possible tag names of other extensions.

#02.07.16->
#Enable WYSIWYG- extension, MW >= 1.25
wfLoadExtension( 'WYSIWYG' ); 
#02.07.16<-

#10.11.13->
#Enable WYSIWYG- extension, MW <= 1.24 (with newer versions will use wfLoadExtension, if supported)
#require_once( "$IP/extensions/WYSIWYG/WYSIWYG.php" );
#10.11.13->

#13.11.13->
#WikiEditor may not be compatible with WYSIWYG editor, use it with caution.
#WikiEditor vers. <= 0.4.0
#require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );    

#WikiEditor vers. >= 0.5.0
#wfLoadExtension( 'WikiEditor' );

#Use this only with MW<=1.24: tells wysiwyg that text based editor is WikiEditor
#$wgCKEditorWikiEditorActive = true;  

# Examples of setting permissions using $wgGroupPermissions, for more detailed explanation see:
#   https://www.mediawiki.org/wiki/Manual:$wgGroupPermissions#Example
# $wgGroupPermissions['user']['wysiwyg'] = true; //Only registered users are allowed to use wysiwyg
# $wgGroupPermissions['*']['wysiwyg'] = true;    //Everyone is allowed to use wysiwyg
$wgGroupPermissions['*']['wysiwyg'] = true;

#Default settings
$wgDefaultUserOptions['riched_disable']               = false;         //true = editor disabled
$wgDefaultUserOptions['riched_start_disabled']        = false;         //Important!!! else bug...
$wgDefaultUserOptions['riched_use_toggle']            = true;          //Editor can toggle CKEditor/WikiText
$wgDefaultUserOptions['riched_use_popup']             = false;         //Deprecated
$wgDefaultUserOptions['riched_toggle_remember_state'] = true;
$wgDefaultUserOptions['riched_link_paste_text']       = true;

##These are not compatible with WYSIWYG
$wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI;
$wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE;
#13.11.13<-

#17.01.14-> 
# Enables/disables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 0;

# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 0;
#17.01.14<-

#27.03.14->
#This was required by SemanticMediaWiki extension in MW 1.22.4 to prevent startup error:
$wgLocalisationUpdateDirectory = "$IP/cache";

#These are for SemanticForms. Wysiwyg is not fully compatiple with SemanticForms and SemanticMediawiki,
#so this is experimental feature.
#enableSemantics( );
#include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );

#Optional excludes of wysiwyg in case SemanticForms and SemanticMediawiki are installed:
#$wgFCKEditorExcludedNamespaces[] = SF_NS_FORM;
#$wgFCKEditorExcludedNamespaces[] = SMW_NS_PROPERTY;
#27.03.14<-

#06.02.15->
#Setting value of following variables eq. to 1 will cause wikitext text blocks
#within specified tags to be displayed as image- element in wysiwyg mode.
#Value eq. to 0 makes texts inside these tags editable directly as text in wysiwyg mode
#using pre- parent tag + child tag.
$wgFCKEditorSpecialElementWithPreTag   = 0; // 1= <pre> tags with attributes only => img- element
#06.02.15<-

#26.02.15->
$wgFCKEditorSpecialElementWithTextTags = 0; // 1= <nowiki>, <source> and <syntaxhighlight> tags => img- element
#26.02.15<-

#24.03.16->
#In case CKEDITOR is installed in some special place, define installation path
#with $wgCKEditor_BASEPATH. If variable is undefined, default value is 'extensions/WYSIWYG/ckeditor/'.
#NOTE! Path must end with character '/' in linux (opsys. windows is untested).
#$wgCKEditor_BASEPATH = 'extensions/WYSIWYG/ckeditor/';

#Debug- mode of resource loader (use only for testing purposes):
#$wgResourceLoaderDebug = true;
#24.03.16<-

#17.04.16->
#In case source files of WYSIWYG/CKeditor are used, they will work only if wgWYSIWYGSourceMode is set to true.
#NOTE! At this point source- mode of WYSIWYG/Ckeditor does not use resourceloaded of MW.
#$wgWYSIWYGSourceMode = true;
#17.04.16<-

WikiEditor:

You should replace at least this file in WikiEditor extension of MW with modified file of this bundle:


SemanticForms:

NOTE! This extension is not mandatory with wysiwyg extension. Wysiwyg is not fully compatiple with SemanticForms and SemanticMediawiki.

You should replace at least following files in SemanticForms extension of MW with modified files of this bundle:

Known bugs with WYSIWYG -extensions and SemanticForms free text block:


Preferences=>Editing (your account settings of MediWiki):

Make sure that settings in your Preferences=>Editing are valid.

DO NOT select these:

  • Show WikiTextEditor
  • Open rich editor in a popup

These may be selected or deselected as you wish:

  • Use toggle to switch between wikitext and rich editor
  • Remember last toggle state
  • Start with rich editor disabled
  • Paste selected text as link text into link -dialog (tog-riched_link_paste_text)

====================

About browser compatibility

Browser versions known to work with this bundle of WYSIWYG:

About versions of IE: