I *believe* so. Both Parsoid and Visual Editor have extension interfaces. However, they haven't really been used by folks outside WMF yet. I'm eager to have that change.
We're thinking about proposing a "Workshop" session at wikimania for "How to write extensions for Parsoid and Visual Editor". But the area's only half-baked, it might be more appropriate to do it as a hackathon session instead. Thoughts? --scott
On Mon, Apr 10, 2017 at 3:20 PM, James Hare jamesmhare@gmail.com wrote:
On April 10, 2017 at 12:15:34 PM, C. Scott Ananian (cananian@wikimedia.org) wrote:
More related functionality: Parsoid supports JSON as a contenttype, and emits a special type of table (the same as the HTML table generated by the HTML handler for JSON in mediawiki). You can edit this in VE, although w/o any special support, and Parsoid will serialize it back to JSON.
This could be turned into a very pleasant type-aware editor for JSON in VE pretty easily. --scott
This is actually very interesting.
So, take a CollaborationHubContent page: https://wpx.wmflabs.org/ w/index.php/WPX:WikiProject_Dogs
At some point we would like to create a VisualEditor-type editing interface. Note that behind the scenes, that page is JSON. So in this “VisualEditor” you would edit fields and such and it would appear you are editing the page as though it were a regular document, but really you are just changing values in a JSON blob.
Since Parsoid supports JSON as a content type, would it thus be trivial to create an extension for VisualEditor to support editing this content type and others like it?
Thanks, James Hare