Difference between revisions of "Visual Editor"
(Created page with "Simple overview on how to install the Parsoid service, and Visual Editor for MediaWiki.") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Simple overview on how to install the Parsoid service, and Visual Editor for MediaWiki. | Simple overview on how to install the Parsoid service, and Visual Editor for MediaWiki. | ||
+ | |||
+ | |||
+ | Resources: | ||
+ | |||
+ | https://www.mediawiki.org/wiki/Parsoid/Setup#Ubuntu_/_Debian | ||
+ | |||
+ | https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/ | ||
+ | |||
+ | https://www.mediawiki.org/wiki/Extension:VisualEditor | ||
+ | |||
+ | <br /> | ||
+ | |||
+ | ==Parsoid Installation (Unbuntu 18.04, 20.04)== | ||
+ | <nowiki>#</nowiki>Import the repository gpg key: (key created on 2019-06-13 with validity 2029-04-23) | ||
+ | |||
+ | 1. sudo apt install dirmngr | ||
+ | |||
+ | 2. sudo apt-key advanced --keyserver keys.gnupg.net --recv-keys AF380A3036A03444 | ||
+ | |||
+ | <nowiki>#</nowiki>Add the Wikimedia repository | ||
+ | |||
+ | 1. sudo apt-add-repository "deb <nowiki>https://releases.wikimedia.org/debian</nowiki> jessie-mediawiki main" | ||
+ | |||
+ | <nowiki>#</nowiki>Installation | ||
+ | |||
+ | 1. sudo apt install apt-transport-https | ||
+ | |||
+ | 2. sudo apt update && sudo apt install parsoid | ||
+ | |||
+ | <nowiki>#</nowiki>Configuration | ||
+ | |||
+ | 1. vim /etc/mediawiki/parsoid/config/yaml | ||
+ | |||
+ | 2. change mwApis section to include: | ||
+ | |||
+ | 2a. uri: 'http(s)://fqdn.com/api.php' | ||
+ | |||
+ | 2b. domain: 'fqdn.com' | ||
+ | |||
+ | 3. wq! | ||
+ | |||
+ | <br /> | ||
+ | |||
+ | ==Visual Editor Installation== | ||
+ | <br />#Download | ||
+ | |||
+ | 1. wget <nowiki>https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_34-74116a7.tar.gz</nowiki> | ||
+ | |||
+ | 2. tar -xzf VisualEditor-REL1_34-74116a7.tar.gz -C /var/www/html/mediawiki/extensions/ | ||
+ | |||
+ | |||
+ | <nowiki>#</nowiki>Add the following lines to the LocalSettings.php (after downloading extension. | ||
+ | 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' => '<nowiki>http://fqdn.org:8142'</nowiki>, | ||
+ | // Parsoid "domain", see below (optional) | ||
+ | 'domain' => 'fqdn.org', | ||
+ | // Parsoid "prefix", see below (optional) | ||
+ | #'prefix' => 'localhost' | ||
+ | ); | ||
+ | <nowiki>#</nowiki>Allow port 8142 | ||
+ | |||
+ | 3. sudo ufw allow 8142 | ||
+ | |||
+ | |||
+ | <nowiki>**</nowiki>NOTES** | ||
+ | =============== Parsoid ================== | ||
+ | |||
+ | #Import the repository gpg key: (key created on 2019-06-13 with validity 2029-04-23) | ||
+ | |||
+ | 1. sudo apt install dirmngr | ||
+ | 2. sudo apt-key advanced --keyserver keys.gnupg.net --recv-keys AF380A3036A03444 | ||
+ | |||
+ | #Add the Wikimedia repository | ||
+ | |||
+ | 1. sudo apt-add-repository "deb <nowiki>https://releases.wikimedia.org/debian</nowiki> jessie-mediawiki main" | ||
+ | |||
+ | #Installation | ||
+ | |||
+ | 1. sudo apt install apt-transport-https | ||
+ | 2. sudo apt update && sudo apt install parsoid | ||
+ | |||
+ | #Configuration | ||
+ | |||
+ | 1. vim /etc/mediawiki/parsoid/config/yaml | ||
+ | 2. change mwApis section to include: | ||
+ | 2a. uri: 'http(s)://fqdn.com/api.php' | ||
+ | 2b. domain: 'fqdn.com' | ||
+ | 3. wq! | ||
+ | |||
+ | ============== Visual Editor ============== | ||
+ | |||
+ | #Download | ||
+ | |||
+ | 1. wget <nowiki>https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_34-74116a7.tar.gz</nowiki> | ||
+ | 2. tar -xzf VisualEditor-REL1_34-74116a7.tar.gz -C /var/www/html/mediawiki/extensions/ | ||
+ | |||
+ | #Add the following lines to the LocalSettings.php (after downloading extension. | ||
+ | |||
+ | === | ||
+ | |||
+ | 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://fqdn<nowiki/>.org:8142', | ||
+ | // Parsoid "domain", see below (optional) | ||
+ | 'domain' => 'fqdn.org', | ||
+ | // Parsoid "prefix", see below (optional) | ||
+ | #'prefix' => 'localhost' | ||
+ | ); | ||
+ | |||
+ | ==== | ||
+ | |||
+ | #Allow port 8142 | ||
+ | 1. sudo ufw allow 8142 (enable this on google cloud as well). | ||
+ | |||
+ | (ran into an error where I put wrong FQDN in the parsoid/config.yaml, and have to manually restart the service with systemctl restart parsoid.) |
Latest revision as of 22:40, 26 July 2020
Simple overview on how to install the Parsoid service, and Visual Editor for MediaWiki.
Resources:
https://www.mediawiki.org/wiki/Parsoid/Setup#Ubuntu_/_Debian
https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/
https://www.mediawiki.org/wiki/Extension:VisualEditor
Parsoid Installation (Unbuntu 18.04, 20.04)
#Import the repository gpg key: (key created on 2019-06-13 with validity 2029-04-23)
1. sudo apt install dirmngr
2. sudo apt-key advanced --keyserver keys.gnupg.net --recv-keys AF380A3036A03444
#Add the Wikimedia repository
1. sudo apt-add-repository "deb https://releases.wikimedia.org/debian jessie-mediawiki main"
#Installation
1. sudo apt install apt-transport-https
2. sudo apt update && sudo apt install parsoid
#Configuration
1. vim /etc/mediawiki/parsoid/config/yaml
2. change mwApis section to include:
2a. uri: 'http(s)://fqdn.com/api.php'
2b. domain: 'fqdn.com'
3. wq!
Visual Editor Installation
#Download
1. wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_34-74116a7.tar.gz
2. tar -xzf VisualEditor-REL1_34-74116a7.tar.gz -C /var/www/html/mediawiki/extensions/
#Add the following lines to the LocalSettings.php (after downloading extension.
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://fqdn.org:8142', // Parsoid "domain", see below (optional) 'domain' => 'fqdn.org', // Parsoid "prefix", see below (optional) #'prefix' => 'localhost' );
#Allow port 8142
3. sudo ufw allow 8142
**NOTES**
=============== Parsoid ================== #Import the repository gpg key: (key created on 2019-06-13 with validity 2029-04-23) 1. sudo apt install dirmngr 2. sudo apt-key advanced --keyserver keys.gnupg.net --recv-keys AF380A3036A03444 #Add the Wikimedia repository 1. sudo apt-add-repository "deb https://releases.wikimedia.org/debian jessie-mediawiki main" #Installation 1. sudo apt install apt-transport-https 2. sudo apt update && sudo apt install parsoid #Configuration 1. vim /etc/mediawiki/parsoid/config/yaml 2. change mwApis section to include: 2a. uri: 'http(s)://fqdn.com/api.php' 2b. domain: 'fqdn.com' 3. wq! ============== Visual Editor ============== #Download 1. wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_34-74116a7.tar.gz 2. tar -xzf VisualEditor-REL1_34-74116a7.tar.gz -C /var/www/html/mediawiki/extensions/ #Add the following lines to the LocalSettings.php (after downloading extension. === 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://fqdn.org:8142', // Parsoid "domain", see below (optional) 'domain' => 'fqdn.org', // Parsoid "prefix", see below (optional) #'prefix' => 'localhost' ); ==== #Allow port 8142 1. sudo ufw allow 8142 (enable this on google cloud as well). (ran into an error where I put wrong FQDN in the parsoid/config.yaml, and have to manually restart the service with systemctl restart parsoid.)