Geshi Highlighting
- Author
- Tom
- Date
- 2008-02-20 23:33:03
So I'm going to use this demo as my blog eventually. That way I figure I'll be more inclined to work on it. Also I'll start adding some features that I find useful. In turn hopefully others will find these useful. This may take me off schedule a little, but I'm already off schedule.
One of the enhanacements I'm currently working on is Geshi highlighting support. There was a CakePHP Geshi helper out there that I found, but for an older version of Geshi and I couldn't get it working.
So I've been able to setup Geshi as a vendor and display a block of php code all highlighted properly. The only way though was to hard code it in. I need to make a helper that will not only pass the code to be highlighted but also some options for styling things and changing Geshi options.
But I have to figure out how I want to flag code in the body copy of a post to be run through Geshi. I don't really want to modify the Geshi code like the other helper did for the same reasons. If Geshi updates, the helper could become outdated and not work for new versions of Geshi.
So one of my solutions would be to add special tags like ##php## all the code here ##php## and then have a function replace everything bewteen the ##php## tag..though I like the pre tags approach that the helper used. I'll see if I can work that in. THEN, I'll add a nice plugin for TinyMCE of course to make it even easier.
After I figure this out...I can actually share some code in this blog to explain what I'm doing and such. I'll also be closer to using it as my personal full time blog.
Then I guess I'll get back to cleaning up the code and making things more efficient.
Admin
Comments