I found this nice syntax highlighter on google code.
1. Download SyntaxHighlighter here
2. Unzip and upload the following files to your webspace (googlepages is a great place)
1. SyntaxHighlighter.css
2. shCore.js'
3. shBrushCpp.js (or whatever code you wish to use on your blog)
3. Go to your Dashboard/Layout/Edit HTML
4. Add the following code right after the tag
< !-- end outer-wrapper -- >
< link href='YOUR_GOOGLE_PAGES/SyntaxHighlighter.css' rel='stylesheet'
type='text/css'/ >
< script language='javascript' src='YOUR_GOOGLE_PAGES/shCore.js'/ >
< script language='javascript' src='YOUR_GOOGLE_PAGES/shBrushCpp.js'/ >
< script language='javascript' >
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');
< /script >
Phần đầy đủ
2. Unzip and upload the following files to your webspace (googlepages is a great place)
1. SyntaxHighlighter.css
2. shCore.js'
3. shBrushCpp.js (or whatever code you wish to use on your blog)
3. Go to your Dashboard/Layout/Edit HTML
4. Add the following code right after the tag
< !-- end outer-wrapper -- >
< link href='YOUR_GOOGLE_PAGES/SyntaxHighlighter.css' rel='stylesheet'
type='text/css'/ >
< script language='javascript' src='YOUR_GOOGLE_PAGES/shCore.js'/ >
< script language='javascript' src='YOUR_GOOGLE_PAGES/shBrushCpp.js'/ >
< script language='javascript' >
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');
< /script >
< pre name="code" class="Cpp" >
...insert code here...
< /pre >
Phần đầy đủ
< pre name="code" class="Cpp" >
...insert code here...
< /pre >
Nhận xét
Đăng nhận xét