I have a database storing "wiki formatted" text which I would like to display in XHTML using PHP.
Here is an example output with all the wiki markup:
Default text
== Heading 1 ==
=== Heading 2 ===
==== Heading 3 ====
===== Heading 4 =====
====== Heading 5 ======
'''Bold'''
''Italic''
<s>Strikethrough</s>
* List item 1
* List item 2
# Numbered item 1
# Numbered item 2
[[Image:http://domain.com/image.png|Image name]]
[http://google.com Link text goes here]
> Blockquote
<source lang="language">Source code</source>
Is that fairly standard wiki syntax? Is there a fairly standard way of interpreting it with PHP?
Thanks in advance!
I would say that the most standard wiki-like format around today is markdown. There are libraries available for almost any platform, including PHP.
MediaWiki is written in PHP and licensed under GPL. So you just could take the WikiText converter and use it.
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