Istao
Istao

Reputation: 7585

How to render a mediawiki page with api?

I should want insert a wikipedia page in another web page, inside a div, with some sort of mediawiki api call in javascript, without all "edit" buttons, menu and so on ; only the article.

I understand nothing about how to render a wikimedia page in element of a web page.

I don't understand how to use http://www.mediawiki.org/wiki/API:Data_formats because I should want html format.

I have seen http://www.mediawiki.org/wiki/API:Parsing_wikitext#parse but I read on the exemple it's for debugging stuff ?? And in http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#View_and_render I've seen render action, but it's deprecated ?

So, how it's possible to do ?

Thanks.

Upvotes: 1

Views: 1664

Answers (1)

svick
svick

Reputation: 244777

I don't see anything on the page you linked to about action=parse being only for debugging. I think that's exactly what you should do.

The API won't give you the HTML directly, it will be enclosed in JSON (or JSONP), but you can get the HTML out of that.

Upvotes: 1

Related Questions