[pmwiki-users] Markup question
Octocias
octocias at googlemail.com
Fri Apr 7 11:53:28 CDT 2006
I wish to create a custom markup which will insert WikiCode.
e.g. For instance, see the documented example:
Markup('example', 'directives',
'/\\(:example:\\)/',
Keep("<div class='example'><p>Here is a <a target='_blank'
href='http://www.example.com'>link</a> to <em>example.com</em></p></div>")
);
This works fine, but how do I generate that text as wiki code?
e.g. This is my starting code:
Usage: (:test sampletext:)
Markup('test', 'fulltext', '/\\(:test +(.*?):\\)/e',
"GenerateWikiCode('$1')");
function GenerateWikiCode($text)
{
$out = "(:table border=5:)";
$out .= "(:cellnr:) Hey";
$out .= "(:cell:) $text";
$out .= "(:tableend:)";
return Keep($out);
}
Is this clear? I want the php function to generate "wiki code to be
translated later to html".
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?
--
Octocias
http://www.octocias.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060407/c98a4457/attachment.html
More information about the pmwiki-users
mailing list