• 로그인 함 해보끄나?

  • Sarangnamu.net June 17, 2003
    Home Login Profile Study Open Project Q&A Google Code
    syntaxhighlighter 사용법
    Last Modify : 03 December, 2010(11:42)
    1. http://code.google.com/p/syntaxhighlighter/ 에서 다운 2. 다음 내용 <head>에 포함
    <link type="text/css" rel="stylesheet" href="/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"></link>
    <script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shCore.js"></script>
    <script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushCpp.js"></script>
    <script language="javascript" src="/dp.SyntaxHighlighter/Scripts/shBrushXml.js"></script>
    
    3. 코드는 다음과 같이 넣는다.
    <pre name="code" class="cpp">
    ... 솰라솰라
    </pre>
    
    4. 다음에 코드를 3 번 밑에 넣는다.
    <script language="javascript">
    dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
    </script>
    
    5. 본다. supported languages http://code.google.com/p/syntaxhighlighter/wiki/Languages
    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
    

    Comment


    입력하3 1513257409



    Locations of visitors to this page