March 07, 2003

MTCodeBeautifier - ActionScript highlight plug-in for MovableType

Here is a cool plug-in for MovableType, it is sure to become very useful considering how many Flashers are using MovableType today. (Not to mention all the Perl and PHP programmers using it): MTCodeBeautifier - MovableType Syntax Highlighting Plug-in

It is Sean Voisen of Voisen.org (former EatOrange) that has taken a project called Beautifier, used for Perl code highlighting, and added support for ActionScript and several other script/programming languages, as well as adding the necessary code to make it into a MovableType plug-in.

Great work Sean! :-)


Testing the plug-in:



CheckerBoard.prototype.drawBoard = function () {
// Settings necessary for resizing of the board
Stage.scaleMode = "noScale";
Stage.align = "tl";

for ( var i = 0; i < this._rows; i++ ) {
for ( var j = 0; j < this._cols; j++ ) {
if ( (i+1)%2 == 0 ) {
if ( (j+1)%2 == 0 ) {
this.private_drawSquare( "WhiteSquare", i, j );
}
else {
this.private_drawSquare( "BlackSquare", i, j );
}
}
else {
if ( (j+1)%2 == 0 ) {
this.private_drawSquare( "BlackSquare", i, j );
}
else {
this.private_drawSquare( "WhiteSquare", i, j );
}
}
}
}

// Set the drawn variable
this._drawn = true;
}


:-)

Comments

Upon further inspection, I am quite dissapointed to realize that the filter must be applied to an entire post or as a portion of a template. I was hoping that Sean would use something like Brad Choate's MTMacro ( http://www.bradchoate.com/past/mtmacros.php ) to create a custom tag that would then be used like a standard HTML tag within the Entry body of any post. That would be ideal. If I post some PHP or actionscript, I'll probably have some of my own text in there too... and I don't want it making all my "NOT"s and "AND"s into different colors.

-michael (the above is an exerpt from my post at http://www.hollowcube.com/talk/archives/000246.html )

Posted by: michael e. gunn on March 7, 2003 01:59 PM : #631



Let me look into this MTMacro thing. I'll be fixing and tweaking it today. Let me know if you find out exactly what is going wrong.

Posted by: Sean Voisen on March 7, 2003 05:38 PM : #632



Trackbacks
URL for trackbacks:
http://weblog.bergersen.net/cgi-bin/mt/mt-tb.cgi/46

new movable type plugin - for syntax highlighting!
Sean Voisen has just released MTCodeBeautifier - a Movable Type plugin that highlights the syntax of various languages. Languages supported so far include: PHP, Java, Scheme, Perl, and ActionScript. He says that it's quite easy to add additional langua... Trackback from: hollowcube.com - talk on March 7, 2003 01:57 PM : #15

Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?