Friday, June 9, 2017

Code syntax highlighting in wordpress com blogs

Code syntax highlighting in wordpress com blogs


WordPress.com uses Alex Gorbatchev�s SyntaxHighlighter so all you need to do is use the right shortcode ex:

[sourcecode language="css"]
#button {
font
-weight: bold;
border
: 2px solid #fff;
}
[/sourcecode]
 
 which gives you something like this:
 
 
 The following languages are supported:
  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml
 For more info http://en.support.wordpress.com/code/posting-source-code/

No comments:

Post a Comment