[pmwiki-devel] How to use the pmwiki renderer standalone

Patrick R. Michaud pmichaud at pobox.com
Wed Feb 28 14:57:08 CST 2007


On Wed, Feb 28, 2007 at 09:48:58PM +0100, Tobias Redmann wrote:
> Hi guys,
> 
> is there a possibilty to use the pmwiki html-renderer standalone? I  
> want to use the renderer in another application.
> 
> Is there a way to do things like this?

You can try something like:

    <?php
      $EnableActions = 0;
      include('pmwiki.php');

      $sometext = '! Headline';

      echo MarkupToHTML($pagename, $sometext);

The $EnableActions = 0; setting tells PmWiki to load and initialize
its many data structures (and local customizations), but don't 
actually perform any actions.  You can then call specific functions 
such as MarkupToHTML as appropriate.

Pm



More information about the pmwiki-devel mailing list