【翻译】AS3语法高亮显示AS3 Syntax Highlighting (with SyntaxHighlighter)

艾敏学
2023-12-01

导读:
  According to Alex Gorbatchev (the creator of SyntaxHighlighter) it should be added to the next release. But until then, you can download the source here.


根据ALEX的语法高亮显示源代码,我创建了AS3的语法高亮显示,ALEX的语法功能也许会在下个版本中出现,但是读者可以到原来的页面去下载
  It's pretty straight forward to use, but just in case:
  1) Download the latest SyntaxHighlighter source.
  2) Download my AS3 extension.
  3) Place the compressed script in SyntaxHighlighter's Scripts directory.
  4) Replace the css file in SyntaxHighlighter's Styles directory if you like my version of the code block more than the default.
  5) Upload the SyntaxHighlighter directory to your server.
  6) At the minimum, add the following to your head tag (pointing to wherever you have placed your js, css and flash files):


很容易使用这个语法高亮显示的库,下载最新的语法高亮显示的源代码,下载我的AS3扩展,将压缩的脚本发在语法高亮显示器目录下,如果你愿意的话替换那些语法高亮显示的CSS文件文件夹
  <link type="text/css" rel="stylesheet" href="css/SyntaxHighlighter.css">
  
  
  
  
  window.onload = function () {
  dp.SyntaxHighlighter.ClipboardSwf = 'flash/clipboard.swf';
  dp.SyntaxHighlighter.HighlightAll('code');
  }
  
  7) Create a pre block similar to the following:
  


  ... some code here ...
  

  As you can see, I'm not actually using SyntaxHighlighter with Movable Type yet, but once I get that figured out, I'll let you know.

本文转自
http://www.digitalflipbook.com/archives/2007/09/as3_syntax_high.php
 类似资料: