DokuWiki Plugin

This is a highlight plugin for DokuWiki.


Plugin archive: Highlight source package

The plugin code is saved in the examples subdirectory.


  • Install highlight on your host
  • Upload the plugin directory into the `lib/plugins/` directory


Paste the following in the edit section of the wiki editing form:

<highlight cpp>#include <stdio.h>

int main (void){
  printf("This is some random code");
  return 0;

Use the lang parameter to define the programming language (c, php, py, xml, etc). See the highlight documentation to learn all possible languages. See the syntax.php file for some formatting options (line numbering, code indentation, line wrapping etc).


See the plugin in action:

<highlight py>class Event:

  def __init__( self, name ): = name

class Widget:

  def __init__( self, parent = None ):
      self.__parent = parent
  def Handle( self, event ):
      handler = 'Handle_' +
      if hasattr( self, handler ):
          method = getattr( self, handler )
          method( event )
      elif self.__parent:
          self.__parent.Handle( event )
      elif hasattr( self, 'HandleDefault' ):
          self.HandleDefault( event )


en/dokuwiki.txt · Last modified: 2012/06/18 21:33 (external edit)
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0