Code 2.1.0 was rewritten from scratch. It
is not compatible with previous addon version and XF below 2.1
but it can handle code block titles from previous addon versions! There is no way to upgrade existing addon!
Remove installed Code addon from you forum. After this install this version as a new addon!
New features
- New way of setting parameters for
code
BB code: [code title="..." lang="..." highlight="..." class="..."]...[/code]
- Line highlighting via
highlight
BB code parameter. Example: ... highlight="3, 5-8" ...
will highlight lines 3, 5, 6, 7 and 8
- "Highlight lines" text field in "Insert code" editor dialog:
- Custom code block CSS class via
class
BB code parameter. Example: ... class="error-log" ...
will add error-log
class to the whole code block
- "Backward compatibility" option to support code block titles with the following format:
[code=title|lang]...[/code]
. Turned off by default!
Changes
- Improved addon stability, better code quality
- Removed "Dark" code style support
- XF 2.1 and PHP 7+ are required now to install the addon