如今FCKEditor变成CKEditor了,不能用原来的Extension了。可是也有了个新的Extension,叫WYSIWYG(WhatYouSeeIsWhatYouGet,所见即所得)。连接是这里:Extension:WYSIWYGphp
你们根据本身的Wiki版本选择对应的就行了。下面说下我安装过程当中遇到的一些问题。数据库
根听说明文档,我把全部的文件都复制到了extensions目录下。而且根据README.md文件中说明的,在LocalSittings.php中插入了加载代码ide
#13.11.13-> require_once( "$IP/extensions/WYSIWYG/WYSIWYG.php" ); # 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; $wgDefaultUserOptions['cke_show'] = 'richeditor'; //Enable CKEditor $wgDefaultUserOptions['riched_use_toggle'] = false; //Editor can toggle CKEditor/WikiText $wgDefaultUserOptions['riched_start_disabled'] = false; //Important!!! else bug... $wgDefaultUserOptions['riched_toggle_remember_state'] = true; //working/bug? $wgDefaultUserOptions['riched_use_popup'] = false; //Deprecated ##These are not compatible with WYSIWYG $wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI; $wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE; #13.11.13<- #17.01.14-> #WikiEditor may not be compatible with WYSIWYG editor, use it with caution. require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); # 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: 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<-
本觉得万事大吉,能够正常使用了,然并卵。ui
出现错误:Fatal error: Call to undefined function enableSemantics() in D:\xampp\htdocs\LocalSettings.phpspa
查了很多资料,才知道由于CKEditor引用了SemanticForms,须要SemanticMediaWiki扩展支持才能正常使用。而这个是要独立安装的。.net
安装SemanticMediaWiki的步骤:code
Step1orm
下载SMWblog
Step2ci
在LocalSettings.php中加入代码:
require_once "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php"; enableSemantics( 'example.org' );
step3
在MediaWiki的页面: "Special:SMWAdmin"进行以下操做
点击: "Initialise or upgrade tables" 按钮来安装数据库
点击: "Start updating data"按钮
ok,SemanticMediaWiki安装成功了。
解决了undefined function的问题。
可是又遇到了一个提示信息:
Warning:call_user_func() expects parameter 1 to be a valid callback ,class 'WikiEditorHooks' does not have a method 'onRegistration' in ExtensionRegistry.php on line 269
又查了一下缘由,是由于以前开通了MediaWiki自带的WikiEditor而引发的冲突错误。
注释掉了加载代码 wfLoadExtension( 'WikiEditor' ); 后终于一切正常了。
能够在MediaWiki中使用CKEditor了。