VisualEditor in MediaWiki

Has anyone successful configured the VisualEditor plugin for a Reclaim-hosted MediaWiki instance?

(As an alternative to configuring and running the Parsoid node process on our machine, it seems like you can point to Parsoid on a different machine, but I wasn’t able to get that working, either, since I wasn’t able to curl the parsoid server on the non-standard port.)

I got a request about a year ago for it and looked into it and as soon as I saw it needed a running Node.JS server I stopped and didn’t look much further (might be the epitome of overengineering, a Node server for a toolbar…). I didn’t realize you could run the Parsoid instance from another server but haven’t experimented myself with it. What port does it use? Opening ports on our end is pretty easy.

The default port for Parsoid (and the one we tried to use) is 8142.

Sweet, thanks! @ari with that port now open on the Minerva server I’d be curious if the method of using a separate server for Parsoid works. If so I would love to hear more about what was involved in setting it up. I’m still not sure even at a dirt cheap $5/mo Digital Ocean VPS that it makes sense for anyone to run a Parsoid server just to get a visual editor in Mediawiki but I am curious about how it all works.

Thanks! Mark already set up the Parsoid server on a Free-Tier EC2 instance. We’ll let you know how it works out.

1 Like

That did the trick, @timmmmyboy. Big thanks to @MarkEst, one of our first year students, for getting this working!

That is awesome! @MarkEst I would love for you to write up a how-to if you feel so inclined. I’ve had a few folks ask about it and not realize what’s involved. Would be cool to see how you did it!

Sure! I mostly just followed instructions in terminal for VisualEditor and Parsoid. The setup is relatively straightforward if you’re comfortable editing PHP and JS config files. Otherwise, I imagine it could very easily get confusing. The biggest hiccup I’ve hit, both here and on AWS, is making sure the port is open. For example, even when the Wiki and Parsoid server were both on the same AWS instance, I still had to unblock the port.

Since we didn’t install Parsoid on Minerva’s server (although we might in the future), I can’t give specific tips about that. The instructions use apt-get, which might add a bump in the road if your servers don’t have it installed.

Let me know if you want any more detailed information!

5 years later. I’m messing around with the Visual Editor in a MediaWiki Project.

The Visual Editor is now included in core, and I think I am reading that Parsoid was rewritten in PHP to make it easier to run.

So I read the documentation at: Extension:VisualEditor - MediaWiki

It looks like I should just be able to add a simple line of code to use the visual editor now.
$wgGroupPermissions[‘user’][‘writeapi’] = true;

However there is a note on there that the new setup in 1.35 in untested on shared hosting. Anyone have any experience with this, or have actually got the visual editor working?

Hey Tim,

Ignore this question. It’s super easy to enable the visual editor. I just needed one more line of code.

## Enable Visual Editor
wfLoadExtension( 'VisualEditor' );

## Visual Editor Permissions
$wgGroupPermissions['user']['writeapi'] = true;

Gotta say, it makes media wiki look a ton more user friendly and useable.

1 Like

Hey Ed,

you were you able to do this with the shared hosting plan? I will have to give this a try!

@George_Navarre

Yup it was super easy. Just put those two lines of code to enable the visual editor and give it the appropriate permissions. And then editing your wiki looks like this:

It looks exactly how the website will look when you click save, and you have buttons to cite, insert images. Frankly, it just makes editing the wiki a modern experience. This was my first mediawiki project, and it was a little difficult to figure out what plugins I should enable, but I think the visual editor is the most important thing I could have done, learning curve wise.