Table of Contents
htmlok Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" yes
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
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
Installation
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.
Examples/Usage
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:
Syntax
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:
<html> This is some <span style="color:red;font-size:150%;">inline HTML</span> </html>
<HTML> <p style="border:2px dashed red;">And this is some block HTML</p> </HTML>
PHP example:
<php> echo 'The PHP version: '; echo phpversion(); echo ' (generated inline HTML)'; </php>
<PHP> echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<td>'.phpversion().'</td>'; echo '</tr></table>'; </PHP>
Configuration and Settings
For HTML | You must activate Allow embedded HTML in the plugin configuration. |
For PHP | You must activate Allow embedded PHP in the plugin configuration. |
Change Log
- Merge pull request #13 from glensc/patch-1 (2024-03-04 09:24)
- Bump release to 2024-01-11 (2024-01-11 10:24)
- Update release.yml (2024-01-11 10:08)
- update plugin.info.txt (2023-05-12 08:20)
- Merge pull request #11 from glensc/ci-deploy (2023-05-12 08:12)
- Use full commit hash (2023-05-11 19:06)
- Update release ci job to 39431875f version (2023-05-11 18:56)
- Revert "update plugin.info.txt" (2023-05-10 14:56)
Comments
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 optionshtmlok
and/orphpok
in the plugin configuration. Has this been done? — saggi 2023-04-06 11:06Yes, 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:42the problem is lower case html/php tags. please include both variantsAll examples from syntax work with the latest version. — saggi 2023-04-13 11:06I'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??