Difference between revisions of "WikiServer - Getting VisualEditor working properly"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
<span style="color:#e74c3c">'''<big>Note:</big>''' This is still a work in progress... Multi-Wiki is a bit of a fail.</span> | <span style="color:#e74c3c">'''<big>Note:</big>''' This is still a work in progress... Multi-Wiki is a bit of a fail.</span> | ||
| − | <span style="color:#e74c3c">'''<big>ANOTHER Note:</big>'''<big> Apparently, This is being rolled into WikiMedia 1.35 by default. '''w00t!!!'''</big></span> | + | <span style="color:#e74c3c">[[mediawikiwiki:Parsing/Parser_Unification|'''<big>ANOTHER Note:</big>'''<big> Apparently, This is being rolled into WikiMedia 1.35 by default. '''w00t!!!'''</big>]]</span> |
==Installing VisualEditor== | ==Installing VisualEditor== | ||
Revision as of 17:26, 25 July 2020
Note: This is still a work in progress... Multi-Wiki is a bit of a fail.
ANOTHER Note: Apparently, This is being rolled into WikiMedia 1.35 by default. w00t!!!
Contents
Installing VisualEditor
VisualEditor does not currently work with private wikis. Supposedly, there are workarounds, but more research is needed.
Requirements
- Parsoid 0.11.0
- Node.js 12
Parsoid Install
https://www.mediawiki.org/wiki/Parsoid/Setup
sudo apt install dirmngrsudo apt-key advanced --keyserver keys.gnupg.net --recv-keys AF380A3036A03444echo "deb https://releases.wikimedia.org/debian jessie-mediawiki main" | sudo tee /etc/apt/sources.list.d/parsoid.listsudo apt install apt-transport-httpssudo apt update && sudo apt install parsoidsudo vim /etc/mediawiki/parsoid/config.yaml
This will require further fuckery for the multi-wiki setup with private wiki!
VisualEditor Install
Find the current version via: Download MediaWiki extension
wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_34-74116a7.tar.gz- This URL will change!
tar -xzf VisualEditor-REL1_34-74116a7.tar.gzsudo rsync -av VisualEditor /var/www/html/wiki/extensionssudo vim /var/www/html/wiki/LocalSettings.php
wfLoadExtension( 'VisualEditor' ); // Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1; // Optional: Set VisualEditor as the default for anonymous users // otherwise they will have to switch to VE // $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor"; // Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable'; // OPTIONAL: Enable VisualEditor's experimental code features #$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1; $wgVirtualRestConfig['modules']['parsoid'] = array( // URL to the Parsoid instance // Use port 8142 if you use the Debian package 'url' => 'http://localhost:8142', // Parsoid "domain", see below (optional) 'domain' => 'localhost', // Parsoid "prefix", see below (optional) 'prefix' => 'localhost' );
Multiple Wiki Configuration
Repeat the parts above where stuff is done in the /wiki/ folder
(but use the folder for your second wiki... duh...)
sudo vim /etc/mediawiki/parsoid/config.yaml
mwApis:
- # This is the only required parameter,
# the URL of you MediaWiki API endpoint.
uri: 'http://wiki.tinkernow.net/api.php'
domain: 'wiki'
prefix: 'wiki'
- # and another MediaWiki
uri: 'http://labnotes.tinkernow.net/api.php'
domain: 'notes'
prefix: 'notes'
sudo service parsoid restartsudo vim /var/www/html/wiki/LocalSettings.php
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
$wgVirtualRestConfig['modules']['parsoid'] = array(
# 'url' => 'http://wiki.tinkernow.net:8142',
'url' => 'http://localhost:8142',
'domain' => 'wiki',
'prefix' => 'wiki'
)
sudo vim /var/www/html/notes/LocalSettings.php
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
#$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://localhost:8142',
'domain' => 'notes',
'prefix' => 'notes',
'forwardCookies' => true
);