Consider the tags wikipedia-api (or the more general mediawiki-api) and mediawiki.
While googling for it.I've stumbled upon html2wiki that seems to do the job(will try after done posting …