Am 09.04.2017 um 08:23 schrieb Denny Vrandečić:
Here's my requirement:
- a wiki page is one JSON document
- when editing, the user edits the JSON directly
- when viewing, I have a viewer that turns the JSON into wikitext, and that
wikitext gets rendered as wikitext and turned into HTML by MediaWiki
Quick thoughts off the top of my head:
Generating wikitext from some other thing is what Scribunto does. Instead of using the Lua handler, you would make a handler for Json, with whetever rules you like for generating wikitext.
I have ne4ver looked at customizing Scribunto, but this seems to right place to plug this in.
The alternative is to try to have some kind of "cascading" ContentHandler, that generates a WikiTextContent object first, and then turns that into HTML.