Submitted by ohaya on Fri, 08/28/2009 - 11:49
Hi,
I just posted to the other forum. I added the code and /code tags (with < and >), but it doesn't appear as a code block. So, how do you get those nice listings in posts, e.g., with the line #s, etc.?
I tried all three "Input format" choices :)...
Jim
Hi,
BTW, using the code and /code tags in the jNetPcap forums seem to work for me (puts the bracketed lines in a gray box with border), so is there something different about the jNetStream forums setup?
But, still can't get that "nice" format with the line numbers :)...
Jim
jNetStream forum and modules need some more configuration tweaks. I'll work on them as time permits.
To get the code-formatter you have to use the "pre" tag like so:
<pre name=code class=java>
// Java code
</pre>
"code" tags are good for shorter samples and inline highlighting and they don't indent well.
Mark,
Ok,
System.out.println("Thanks!");Jim
LOL!!!
I should add that there are also 2 options that are available with code-formatter
<pre name=code class=java:nogutter>
</pre>
<pre name=code class=java:nocontrols>
</pre>
<pre name=code class=java:nocontrols:nogutter>
</pre>
Sometime, I use those for 1 line examples.
And here is the link where to download it with full manual:
http://code.google.com/p/syntaxhighlighter/
Mark,
Thanks. That is cool!
Jim
P.S. BTW, on this (jNetStream) forum, when I post, the page where I'm posting only has "Preview" button, and no "Save" or "Submit". The jNetPcap forum seems to behave differently (there, there are 2 buttons).