<br><br><div><span class="gmail_quote">On 07/04/06, <b class="gmail_sendername">Octocias</b> <<a href="mailto:octocias@googlemail.com">octocias@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;"><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%27" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.example.com'</a>>link</a> to <em><a href="http://example.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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></div><div style="direction: ltr;"><span class="sg"><br>-- <br>Octocias<br><a href="http://www.octocias.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.octocias.com
</a>
</span></div></blockquote></div><br><br clear="all"><br>-- <br>Octocias<br><a href="http://www.octocias.com">http://www.octocias.com</a>