[Pmwiki-users] Pre-formatted text hook?
Thu Oct 9 16:21:07 CDT 2003
I was wondering if it would be possible to add a hook for extending the
preformatted text syntax [= ... =], something along the lines of what I
did for the "beautifier" plugin? There, I look at the text immediately
following the opening brace, so
[=cpp ... =]
means a block of preformatted C++ code. Currently, it is necessary to
modify the PrintText() function in pmwiki.php. Is there any possibility
of creating an official mechanism for this sort of thing? What is needed
is a way to register a handler for a particular type of preformatted
text, which would be called with the enclosed text. The handler would
return a new block of text that would be placed into the "$kpv" array.
Feel free to recommend a new markup, I just did what was easiest.
Thanks! And as always keep up the great work!
More information about the pmwiki-users