Syntaxhighlighter Drupal module

in

This module integrates the SyntaxHighlighter Javascript Library into Drupal for source code list syntax highlighting within any Drupal contents. All source code listing on this site is done with this module. See my article about this module here.

0
Your rating: None

回應瀏覽選項

選擇你喜歡的顯示回應的模式,並點選"儲存設定",以啟用你所做的改變。

<?php phpinfo(); ?>

Friend's 的頭像

<?php  phpinfo(); ?>

feature suggestion/request

Friend's 的頭像

First off, great module!  Really a great module for any site that needs to post code.<br>

I wanted to suggest either an addon to this module or a new cck field module that creates a textarea in a content type that is specifically for code and does not require the {syntaxhighlighter} tags.  The tags are great for inline text but are rather inconvenient for users when you have a content type that is specifically for posting code.

You can use the pre tag anywhere

Alpha Epsilon Delta's 的頭像

So in any place where you want highlighted code to appear, you can use the Syntaxhighlghter's <pre> tag format. So you can just do this:

blah blah blah some thing something...

<pre class="brush:xyz;gutter:false">

code here

</pre>

more blah blah blah

<pre class="blush:php">

some other code

</pre>

This way you can have code anywhere, not limited to where you put the CCK field.

I've thought about this and this is the way I intent this module to work.

If you have better idea, please let me know.

發表新回應

  • 自動將網址與電子郵件位址轉變為連結。
  • 自動斷行和分段。
  • 可使用的 HTML 標籤:<a> <blockquote> <br> <cite> <code> <dd> <div> <dl> <dt> <em> <li> <ol> <p> <pre> <span> <strong> <ul>
  • Syntax highlight code surrounded by the {syntaxhighlighter OPTIONS}...{/syntaxhighlighter} tags.

更多關於格式選項的資訊

Navigation

使用者登入