각종 옵션들
- <pre class="brush:html"> <!-- HTML 소스표시 -->
- <pre class="brush:css"> <!-- CSS 소스표시 -->
- <pre class="brush:js"> <!-- JavaScript 소스표시 -->
- <pre class="brush:html highlight:[2,4]"> <!-- 특정 행 강조 -->
- <pre class="brush:js html-script:true"> <!-- 다른 언어와 HTML -->
- <pre class="brush:html first-line:25"> <!-- 시작 행 번호 변경 -->
- <pre class="brush:html toolbar:false"> <!-- 도구모음 숨기기 -->
- <pre class="brush:html auto-links:false"> <!-- 오토 링크 해제 -->
- <pre class="brush:html" title="Blomari Note"> <!-- 제목 표시 -->
테마 변경
- <link rel="stylesheet" type="text/css" href="./images/shCoreDefault.css" />
테마 레퍼런스 사이트
shCore 와 shTeme의 차이점
shCore가 주변 테두리 없이 변경되어서 좋음.
언어 종류
- SyntaxHighlighter.autoloader(
- 'applescript ./images/shBrushAppleScript.js',
- 'actionscript3 as3 ./images/shBrushAS3.js',
- 'bash shell ./images/shBrushBash.js',
- 'coldfusion cf ./images/shBrushColdFusion.js',
- 'cpp c ./images/shBrushCpp.js',
- 'c# c-sharp csharp ./images/shBrushCSharp.js',
- 'css ./images/shBrushCss.js',
- 'delphi pascal ./images/shBrushDelphi.js',
- 'diff patch pas ./images/shBrushDiff.js',
- 'erl erlang ./images/shBrushErlang.js',
- 'groovy ./images/shBrushGroovy.js',
- 'java ./images/shBrushJava.js',
- 'jfx javafx ./images/shBrushJavaFX.js',
- 'js jscript javascript ./images/shBrushJScript.js',
- 'perl pl ./images/shBrushPerl.js',
- 'php ./images/shBrushPhp.js',
- 'text plain ./images/shBrushPlain.js',
- 'py python ./images/shBrushPython.js',
- 'ruby rails ror rb ./images/shBrushRuby.js',
- 'sass scss ./images/shBrushSass.js',
- 'scala ./images/shBrushScala.js',
- 'sql ./images/shBrushSql.js',
- 'vb vbnet ./images/shBrushVb.js',
- 'xml xhtml xslt html ./images/shBrushXml.js'
- );
사용방법
<pre class="brush: 언어이름;">
/* 코드 */
</pre>
<script type="syntaxhighlighter" class ="brush: 언어이름">
/* */
</script>
참고 사이트
http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/
http://blomari.tistory.com/54