<br>I wish to create a custom markup which will insert WikiCode.<br><br>e.g. For instance, see the documented example:<br><br>Markup('example', 'directives', <br> '/\\(:example:\\)/', <br> Keep("<div class='example'><p>Here is a <a target='_blank' href='
<a href="http://www.example.com'">http://www.example.com'</a>>link</a> to <em><a href="http://example.com">example.com</a></em></p></div>") );<br><br>This works fine, but how do I generate that text as wiki code?
<br><br>e.g. This is my starting code:<br><br>Usage: (:test sampletext:)<br><br>Markup('test', 'fulltext', '/\\(:test +(.*?):\\)/e', "GenerateWikiCode('$1')");<br>function GenerateWikiCode($text) <br>{<br> $out = "(:table border=5:)";
<br> $out .= "(:cellnr:) Hey";<br> $out .= "(:cell:) $text";<br> $out .= "(:tableend:)";<br> return Keep($out);<br>}<br><br>Is this clear? I want the php function to generate "wiki code to be translated later to html".
<br><br>I can get it to work fine if I put the code into the markup directive, but I'd prefer to use the php function. Is this possible? <br><br>-- <br>Octocias<br><a href="http://www.octocias.com">http://www.octocias.com
</a>