Download Plugin (zip)

Stats

Version

0.3

Wheels Compatibility

1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0

Downloads

18

Last Updated

June 30, 2010

About Plugins

Plugins allow you to extend or modify default Wheels application behavior. To use, you just drop the zip file into your plugins directory and reload your application.

Read Using and Creating Plugins for more information.

ColdFISH on Wheels

Jason Delmore's ColdFISH syntax highlighter as a ColdFusion on Wheels plugin.

Author

Chris Peters

Project Home

http://github.com/clearcrystalmedia/ColdFISH-on-Wheels

Description

ColdFISH outputs highlighted syntax for a string or a file containing CFML, CFScript, HTML, CSS, JavaScript, SQL, ActionScript, MXML, and comments for all of these languages.

Credits

ColdFISH was created by Jason Delmore. Jason deserves way more credit than Chris for this awesome project.

Usage/Examples

Usage

This plugin provides one method for use in your controllers and views: formattedCode(). This function accepts two main arguments: code or filePath.

  • Pass a string to be formatted as the code argument.
  • Pass the path to a file to be read, formatted, and returned as the filePath argument.

If you pass both arguments, code takes precedence.

By default, your formatted code will be wrapped by the tag . You can configure this using the arguments listed below or by setting configurations outlined in the Configurations section below.

Examples

You can pass in some code as an argument:

Here is my awesome code:

#formattedCode('
#i#
')#

Or if you want to read in a file on your server to parse and output, that works as well:

#formattedCode(filePath=ExpandPath("/path/to/your/code.cfm"))#

Configuration

After installing the ColdFISH on Wheels and reloading your Wheels application, this plugin will copy a config file for your use at config/coldfishconfig.xml.

Use the tag near the top of the file to change settings for the parser.

Note: Please ignore the config file included with the rest of this plugin's code. This plugin will ignore that file.

wrapperElement and wrapperClass are configurable in your config/settings.cfm or events/onapplicationstart.cfm files.

Here is a sample demonstrating how to set the plugin to always wrap the formatted code with (unless overridden by specifying it directly in the function's arguments):

Change Log

Version 0.3—June 30, 2010 Download

  • Fixed bugs related to file paths on Linux.
  • Wheels compatibility: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5.

Version 0.1—June 25, 2010 Download

  • Initial release.
  • Wheels compatibility: 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5.