This Renderer Plugin allows clean formatting of computer code in your posts.
|Last tested in version:|
- XHTML strict: If enabled this will remove the ‘ target="_blank" ‘ from the PHP documentation links.
- Display code toolbar: display code toolbar in expert mode and on comment form (individual users can override this).
In b2evolution v5 and above, it is recommended to use this plugin with a low priority (for example: 10) so that it is called before the other plugins.
One important thing that will happen is that when a post is saved (plugin event
FilterItemContents) will be fired, the plugin will transform shortcodes like
[codeblock lang="php" line="5"] into markup like
<!-- codeblock lang=php line=5 --><pre class="codeblock"><code>. This will allow for other plugins to be able to detect
<code> tags and not render/alter text within computer code.
The easiest way to use this plugin is to use its toolbar: