It's better when it's simple

User Tools

Site Tools


htmlok Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" unknown

plugin Allows to embed HTML and PHP in Wiki Pages

Last updated on
Conflicts with
confightmlok, htmlokay

Security warning (please read plugin security guidelines): This extension will allow execution of scripts. It should only be used when you trust ALL editors, best suited in private personal wikis.

Similar to confightmlok, embeddedphp, htmlokay, htmlsafe, phpwikify

Tagged with html, php


:!: This plugin allows the use of HTML and PHP in releases after “Igor”. In the DokuWiki core the HTML and PHP support has been removed since release “Jack Jackrum” for security reasons. Under this aspect, this plugin should also be considered critically!
:!: Before installation and use, please consider the alternatives!

Install the plugin using the Extension Manager Plugin and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.


:!: A simultaneously installed confightmlok (htmlokalt) with disabled processing leads to the source code and not the result is displayed!

Please Note: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed.

The code of the plugin was taken from the original implementation in DokuWiki core. So the use is also the same:


You can embed raw HTML or PHP code into your documents by using the <html> or <php> tags. (Use uppercase tags if you need to enclose block level elements.)

HTML example:

This is some <span style="color:red;font-size:150%;">inline HTML</span>
<p style="border:2px dashed red;">And this is some block HTML</p>

PHP example:

echo 'The PHP version: ';
echo phpversion();
echo ' (generated inline HTML)';
echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>';
echo '<td>'.phpversion().'</td>';
echo '</tr></table>';

Configuration and Settings

For HTMLYou must activate Allow embedded HTML in the plugin configuration.
For PHPYou must activate Allow embedded PHP in the plugin configuration.

Change Log


1st: Thank you for restoring core functionality. 2nd: does not work yet, still see the html code, not the result.

You have to activate the config options htmlok and/or phpok in the plugin configuration. Has this been done? — saggi 2023-04-06 11:06
Yes, in GUI-Config both Options set.
$conf['plugin']['htmlok']['htmlok'] = 1;
$conf['plugin']['htmlok']['phpok'] = 1;
$conf['htmlok'] = '1';
$conf['phpok'] = '1';

Don't know if the different datatype is a problem?

Sorry, I can't recreate the problem. Is the code shown enclosed in code tags or just plain text? Can you open a thread about this on Github or in the forum? — saggi 2023-04-06 12:42
the problem is lower case html/php tags. please include both variants
All examples from syntax work with the latest version. — saggi 2023-04-13 11:06
I've reinstalled the plugin right before the test. without changes to the tags, nothing happens (just plain html code without the tags), with opening tag to upper case it's broken, with both uppercase it works like before??
plugin/htmlok.txt · Last modified: 2023-05-15 20:27 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki