다음을 사용하려고 하는 페이지에 삽입한다.
<link href="./images/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></link>
<script language="javascript" src="./images/shCore.js"></script>
<script language="javascript" src="./images/shBrushCpp.js"></script>
<script language="javascript" src="./images/shBrushCss.js"></script>
<script language="javascript" src="./images/shBrushJava.js"></script>
<script language="javascript" src="./images/shBrushJScript.js"></script>
<script language="javascript" src="./images/shBrushSql.js"></script>
<script language="javascript" src="./images/shBrushXml.js"></script>
<script language="javascript">
dp.SyntaxHighlighter.ClipboardSwf = './images/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</script>
사용방법
<textarea class="java" name="code" rows="10" cols="50">
<!--소스코드삽입-->
</textarea>
<pre class="java:nocoltrols:firstline[1]" name="code">
<!--소스코드삽입-->
</pre>
Language |
Aliases |
C++ |
cpp, c, c++ |
C# |
c#, c-sharp, csharp |
CSS |
css |
Delphi |
delphi, pascal |
Java |
java |
Java Script |
js, jscript, javascript |
PHP |
php |
Python |
py, python |
Ruby |
rb, ruby, rails, ror |
Sql |
sql |
VB |
vb, vb.net |
XML/HTML |
xml, html, xhtml, xslt |
- Configuration Option
Options |
|
nogutter |
Will display no gutter. |
nocontrols |
Will display no controls at the top. |
collapse |
Will collapse the block by default. |
firstline[value] |
Will begin line count at value. Default value is 1. |
showcolumns |
Will show row columns in the first line. |
'Dev Story > dev' 카테고리의 다른 글
[jquery] jQuery UI Layout Plug-in (0) | 2012.04.10 |
---|---|
[svn] trunk, branches, tags 디렉토리 용도 (0) | 2012.03.30 |
[tomcat] MAC OS에서 tomcat 설정 (0) | 2010.08.05 |
[openlayers] GetFeature 지원하지 않는 ContentType 오류 처리 (0) | 2010.06.14 |
[cvs] 사용자 생성 및 삭제 (1) | 2010.06.04 |