Like most good ideas, someone has already done it as a plugin: http://www.naden.de/blog/wordpress-code-editor -- Matt Mullenweg http://photomatt.net | http://wordpress.org http://automattic.com | http://akismet.com