-
Notifications
You must be signed in to change notification settings - Fork 27
dokuwiki api spans
This section describes text formatting using span functions.
These are the basic span functions with a predefined style. These are also called for basic DokuWiki rendering and therefore the function declarations need to match the class Doku_Renderer.
The function opens a span for bold text. Also see DokuWiki basic text formatting.
The function closes a bold text span.
The function opens a span for italic text. Also see DokuWiki basic text formatting.
The function closes a italic text span.
The function opens a span for underlined text. Also see DokuWiki basic text formatting.
The function closes a underlined text span.
The function opens a span for monospace text. Also see DokuWiki basic text formatting.
The function closes a monospace text span.
The function opens a span for subscript text. Also see DokuWiki basic text formatting.
The function closes a subscript text span.
The function opens a span for superscript text. Also see DokuWiki basic text formatting.
The function closes a superscript text span.
The function opens a span for deleted/strike-through text. Also see DokuWiki basic text formatting.
The function closes a deleted/strike-through text span.
The following code:
$renderer->cdata('This is ');
$renderer->strong_open();
$renderer->cdata('bold');
$renderer->strong_close();
$renderer->cdata('text.');
generates "This is bold text."
Nested function calls can be used to generate a combination of text styles. The following code:
$renderer->cdata('This is ');
$renderer->strong_open();
$renderer->emphasis_open();
$renderer->cdata('bold and italic');
$renderer->emphasis_close();
$renderer->strong_close();
$renderer->cdata('text.');
generates "This is bold and italic text."