How to download MediaWiki WikiEditor?

I have an old skin that I need to adapt to the new MediaWiki 1.18, which has this new WikiEditor. If I set the Simple skin or any other theme than the custom theme, then I see the WYSIWYG editor (WikiEditor), but if I use a custom skin, I can’t see it.

I think that I have something missing, I spent one and a half working days trying to understand what I am missing, but the skin seems the same as other skins. I checked the MediaWiki homepage, but they don’t say what I need to do to download this WikiEditor.

To confirm: WikiEditor source codes never load, i.e. ResourceLoader does not load them, but I don’t know how to do this.

+6
source share
2 answers

Starting with 1.18, skins should use the following instead of writing their own HTML HEAD sections:

 $this->html( 'headelement' ); 

headelement includes a body open tag, so everything between this and doctype should be removed from your old code. Of course, this will lead to the rejection of compatibility with the preview-1.18 mediawiki.

In addition, your skin can also be modified to use a SkinTemplate, not a BaseTemplate, in a class declaration.

+3
source

From Extension: WikiEditor :

 For 1.18 and later the extension already comes with your MediaWiki package. You only need to install and configure it as described below: Add the following line to your LocalSettings.php: require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); To enable use of WikiEditor by default but still allow users to disable it in preferences, use something like... $wgDefaultUserOptions['usebetatoolbar'] = 1; $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; $wgDefaultUserOptions['wikieditor-preview'] = 1; 
+6
source

Source: https://habr.com/ru/post/912235/


All Articles