Ani*_*nil 64 blogger syntax-highlighting syntaxhighlighter
如何在博客新界面上设置语法荧光笔.我尝试了很多选项,但直到没有工作.请给出任何建议.
Mah*_*iya 130
1. 首先,把你的博客模板的备份
2. 之后打开你的博客模板(在编辑HTML模式)复制所有的CSS 在这个环节上给予前</b:skin>标签
3 粘贴前followig代码</head>标签
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCSharp.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCss.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushDelphi.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJava.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJScript.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPhp.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPython.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushRuby.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushSql.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushVb.js' type='text/javascript'></script>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js' type='text/javascript'></script>
Run Code Online (Sandbox Code Playgroud)
4. 在</body>标记之前粘贴以下代码.
<script language='javascript'>
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');
</script>
Run Code Online (Sandbox Code Playgroud)
5. 保存Blogger模板.
6. 现在语法高亮可以使用,您可以将它与<pre></pre>标签一起使用.
<pre name="code">
...Your html-escaped code goes here...
</pre>
<pre name="code" class="php">
echo "I like PHP";
</pre>
Run Code Online (Sandbox Code Playgroud)
7. 你可以逃脱你的代码在这里.
8. 以下是<class>属性支持的语言列表.
Joh*_*rck 23
结帐http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html
这是一个非常简单的"Blogger的SyntaxHighlighter"教程,带有截图和一切.
你应该在几分钟内启动并运行.
此外,本教程围绕您所指的"新界面"构建.
希望这可以帮助.快乐的编码.
| 归档时间: |
|
| 查看次数: |
33906 次 |
| 最近记录: |