Difference between revisions of "Visual editor"

From Organic Design wiki
m
(NodeSource)
Line 1: Line 1:
 
I'm creating a local page for this as it was quite difficult to install so I want some of my own notes for future reference. The main page for the extension is at [[MW:Extension:VisualEditor]].
 
I'm creating a local page for this as it was quite difficult to install so I want some of my own notes for future reference. The main page for the extension is at [[MW:Extension:VisualEditor]].
  
First download and unpack a snapshot for the extension corresponding to the wiki version as usual, then install ''nodejs'' with apt, but if your repo has an older version than 0.8, then remove it and install using the following commands (see [https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager this] for details).
+
First download and unpack a snapshot for the extension corresponding to the wiki version as usual, then install ''nodejs'' with apt, but if your repo has an older version than 0.8, then remove it and install from [https://nodesource.com/ NodeSource] using the following commands (see [https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager this] for details).
 
{{code|<bash>curl -sL https://deb.nodesource.com/setup | sudo bash -
 
{{code|<bash>curl -sL https://deb.nodesource.com/setup | sudo bash -
 
apt-get install nodejs</bash>}}
 
apt-get install nodejs</bash>}}
  
  
Now install the ''paisoid'' package via apt.
+
Now install the ''paisoid'' package via apt (see [[MW:Parsoid/Setup]] for more detail).
 
{{code|<pre>apt-get install nodejs</pre>}}
 
{{code|<pre>apt-get install nodejs</pre>}}
  
Line 14: Line 14:
  
  
Restart the parsoid daemon and then test that you can read a page as follows
+
Restart the ''parsoid'' daemon and then test that you can read a page as follows
 
{{code|<bash>/etc/init.d/parsoid restart
 
{{code|<bash>/etc/init.d/parsoid restart
 
wget http://localhost:8142/123/Main_Page</bash>}}
 
wget http://localhost:8142/123/Main_Page</bash>}}
Line 36: Line 36:
  
  
If you're running a private wiki (no public editing allowed) then you'll need to also set the following, but note that this means your cookie data is being sent over HTTP, so make sure you only do this if the parsoid daemon is on the localhost.
+
If you're running a private wiki (no public editing allowed) then you'll need to also set the following, but note that this means your cookie data is being sent over HTTP, so make sure you only do this if the ''parsoid'' daemon is on the localhost.
 
{{code|<php>$wgSessionsInObjectCache = true;
 
{{code|<php>$wgSessionsInObjectCache = true;
 
$wgVisualEditorParsoidForwardCookies = true;</php>}}
 
$wgVisualEditorParsoidForwardCookies = true;</php>}}
  
  
You may also like to lock down the parsoid daemon so it can only be accessed from the local host which you can do by editing ''/etc/default/parsoid'' and changing the ''INTERFACE'' setting from ''0.0.0.0'' to ''127.0.0.1'' and restarting the daemon.
+
You may also like to lock down the ''parsoid'' daemon so it can only be accessed from the local host which you can do by editing ''/etc/default/parsoid'' and changing the ''INTERFACE'' setting from ''0.0.0.0'' to ''127.0.0.1'' and restarting the daemon.
 
[[Category:Extensions]][[Category:MediaWiki]][[Category:Help]]
 
[[Category:Extensions]][[Category:MediaWiki]][[Category:Help]]

Revision as of 20:46, 28 August 2014

I'm creating a local page for this as it was quite difficult to install so I want some of my own notes for future reference. The main page for the extension is at MW:Extension:VisualEditor.

First download and unpack a snapshot for the extension corresponding to the wiki version as usual, then install nodejs with apt, but if your repo has an older version than 0.8, then remove it and install from NodeSource using the following commands (see this for details).

<bash>curl -sL https://deb.nodesource.com/setup


Now install the paisoid package via apt (see MW:Parsoid/Setup for more detail).

apt-get install nodejs


Edit the parsoid configuration (/etc/mediawiki/parsoid/settings.js) adding a line for each wiki in the wikia that will be using the editor, e.g.

parsoidConfig.setInterwiki( '123', 'http://123.organicdesign.co.nz/wiki/api.php' );


Restart the parsoid daemon and then test that you can read a page as follows

<bash>/etc/init.d/parsoid restart

wget http://localhost:8142/123/Main_Page</bash>


Include the extension and its settings in the wiki's LocalSettings.php, e.g.

{{{1}}}


If you're running a private wiki (no public editing allowed) then you'll need to also set the following, but note that this means your cookie data is being sent over HTTP, so make sure you only do this if the parsoid daemon is on the localhost.

{{{1}}}


You may also like to lock down the parsoid daemon so it can only be accessed from the local host which you can do by editing /etc/default/parsoid and changing the INTERFACE setting from 0.0.0.0 to 127.0.0.1 and restarting the daemon.