Gaurav
Gaurav

Reputation: 1567

Formatting Java code in WordPress posts, like in Eclipse

I am about to write some posts which has some Java code, and I would like to format it properly by coloring the Java keywords. Like in Eclipse.

I am looking for some recommendation for a theme / plugin to use.

Upvotes: 4

Views: 6483

Answers (2)

gkephorus
gkephorus

Reputation: 1386

It looks like it's rather standard nowadays:

[code language="css"]
   Your code here
[/code]

As described here by WordPress itself.

Upvotes: 7

BendaThierry.com
BendaThierry.com

Reputation: 2110

The Chili code formatter is a good WordPress plugin to do that.

Alternative link: WP Chili

You could have some other plugins with this page or this other one.

However, it has not been updated for since 2010. Maybe you should use much recent one like the WP Code plugin.

It seems new versions of WordPress have already included the support of code posting. It is very interesting for me too, LOL.

Upvotes: 4

Related Questions