Introduction
Flash Text Formatter (FTF) can format the text according to keyword definition list stored in external XML file. Its primary purpose is code syntax highlighting and at this moment it supports:
ActionScript 2
PHP
JavaScript
Python
Writing keyword definition XML is easy, so expect this list to grow fast.
Using FTF
To add FTF to your page, insert 'ftf.swf' in your HTML and use FlashVars to pass any of the following parameters:
file (path to the text file that will be highlighted)
def (path to the definition XML file)
auto (true or false, indicates if the text file will be automatically highlighted when loaded or 'HiLight' button will appear)
width and height attribute values of OBJECT and EMBED tag will be used to resize the content of FTF so that it uses all available space.
Upload files from FTF_WordPress folder to 'wp-content/plugins' folder in your WordPress installation directory
Login to WordPress administration panel and 'Activate' Flash Text Formatter plugin in 'Plugins' tab.
When writing the blog entry use [ftf][/ftf] tags to mark the text that needs to be formatted (and that will appear inside FTF). You can also specify parameters for FTF as attributes of [ftf] tag. For example:
[ftf w="400" h="300"]import mx.utils.Delegate;[/ftf]
will insert 400x300 pixels FTF and highlight the text inside tags using AS2 keyword definition.
In case you omit some of the parameters, default values will be applied, and these are: width="480"; height="300"; def="as2.xml"; auto="true";
You can also use external file for the content of the FTF by specifying path as 'file' parameter.
FTF will not work well with Textile 1 plugin so you will have to disable it
Download
Flash Text Formatter can be downloaded for free if you are subscriber of FlashTextEditor.com newsletter. Source files are released under GNU LGP License.
WordPress Plugin is using Flash / JavaScript Integration Kit
FTF was tested with Firefox 1.0.4, IE 6.0 and Safari.