unwwwritten
Helping Improve a Good Thing
Posted August 26th, 2007 at 10:54 pm PDT by S. Brent Faulkner — View Comments
A couple of posts ago I talked a bit about SimpleHighlight. Today, I beat up the code a bit to support setting a couple of options for each code block. I e-mailed my changes to the author of SimpleHighlight and am happy to announce that as of today you can start a code block with a tag like the following...
<code theme="all_hallows_eve" numbers="no"> insert code here... </code>
The options supported currently are:
language="..." -- specify language of code block (the legacy option class="..." is still supported too)
theme="..." -- specify theme for code block
numbers="..." -- specify whether or not to show line numbers
Just to show the flexibility of this, here are a few more examples...
<code language="html" theme="twilight">
<div id="sample"><p>Here is some <b>HTML</b></p></div>
<code language="html" theme="eiffel" numbers="no">
<div id="sample"><p>Here is some <b>HTML</b></p></div>
<code language="html" theme="cobalt" numbers="no">
<div id="sample"><p>Here is some <b>HTML</b></p></div>
Cheers.
--Brent
blog comments powered by Disqus