How can I create a custom "code" tag that does the basically the same thing as CODE but allows me to use the COLOR bbcode tag inside to color specific text?
My tutorial site makes use of a lot of code and I like to color certain variables, IDs, passwords, etc. that are used for example only so the reader knows where to expect to plugin their own values.
Example:
Code: Select all
[mycode]$config['base_url'] = 'http://[color=red]192.168.107.55[/color]/ci';[/mycode]
$config['base_url'] = 'http://192.168.107.55/ci';
Here is what used to work in 3.0.8
Usage:
Code: Select all
[mycode]{TEXT}[/mycode]
Code: Select all
<code style="background-color: #fff; color: #040; white-space: pre; border: 1px solid #000; font: Courier, monospace; display: block">{TEXT}</code>
LHammonds