How can i convert the wikitext to html format using php ? If anyone knows the libraries please help me..
Thanks in advance...
MediaWiki.org has a list of alternative parsers. A few of them use PHP.
As cbuckley indicated, MediaWiki's own parser is also written in php, but it is surely too tightly woven into MediaWiki to be of use to you.
You can also run your wikitext through the MediaWiki API's parse function or if you are exporting content from a running MediaWiki installation, fetch parsed content from the API directly: see this example on the Stack Overflow article.
Finally, you can get the non-API part of MediaWiki to output raw article HTML using "action=render". See this example on the Stack Overflow article.
If you're talking about MediaWiki, the manual page for their parser may help you; there is a link to their source from there. It's not insubstantial, but you might be able to pull from it the bits relevant to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With