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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

<?php phpinfo(); ?>

Friend's picture

<?php  phpinfo(); ?>

feature suggestion/request

Friend's picture

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 picture

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.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <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.

More information about formatting options

Navigation

User login