https://bugzilla.wikimedia.org/show_bug.cgi?id=55682

--- Comment #3 from Matthias Mullie <[email protected]> ---
As far as I can tell, Parsoid has endpoints for:

#1 Regular article parsing (get annotated HTML by submitted page title): GET
<parsoid>/en/page-title
#2 Regular article serialization using POST (get wikitext by submitted HTML):
POST <parsoid>/en/page-title
#3 Form-based wikitext -> HTML DOM interface for manual testing: POST
<parsoid>/_html
#4 Form-based HTML DOM -> wikitext interface for manual testing:
<parsoid>/_wikitext


to HTML:

#1 is not something we can use: it will query ApiQueryRevisions.php for the
page's content, which only works with pages; not something Flow can hook into
#3 is something we could use, but it is documented to only be for manual
testing


to wikitext:

#2 is ok to use (we currently do, via VE's API)
#4 is something we could use, but it is documented to only be for manual
testing

--

Flow currently uses VE's API (which did provide a way to do wikitext->HTML,
albeit not using Parsoid), though we should probably change that.

Short-term, we could change ParsoidUtils to again call Parsoid's form-based
interfaces for manual testing.
In the longer run, we'll need Parsoid to provide another endpoint (see below).
I'm indifferent to whether Flow calls it directly or via VE's API. I'd prefer
not to do a similar thing twice, but there may be reasons to do so; to be
figured out once we pick up VE integration into Flow again.

--

To Parsoid team (I don't know much of Parsoid's inner workings, so I may be
mistaken)

In order for Flow to use Parsoid for wikitext->HTML, we'd need Parsoid to
provide either:

* A stable (not for testing) endpoint that receives wikitext directly and
transforms it to annotated HTML
* A stable endpoint that calls an API based on an identifier (e.g. #1, which
recieves a page title), but allows additional parameters to let Flow decide
which API should be called (so we can make it return Flow content)

If I have missed any existing functionality that does what we need, please
point it out :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to