You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Clinton Gormley <cl...@traveljury.com> on 2007/03/15 10:25:46 UTC

Tiny MCE Perl compressor

Hi all

(Cross posted because relevant to both newsgroups)

I'm guessing that some people on this list use the Tiny MCE WYSIWYG
editor (http://tinymce.moxiecode.com/) - it's OSS, it's cross platform
and works really well.

Moxiecode have a number of 'compressors' which gather up all the
(non-image) files you need for your required configuration of the
editor, and sends them out in a single JS file, optionally with GZIP
compression, which greatly speeds up the loading of the editor.

But it was only available in PHP/.NET/JSP/ColdFusion and a separate port
to Ruby. So....

I rewrote the PHP compressor in Perl yesterday, tested in Firefox 2.0
with version 2.1.0 of the editor, and it works a treat.  It will run
under CGI or under mod_perl.  It should run under Windows or Macs, but I
haven't tested it.

Download it here:
http://www.iannounce.co.uk/tinymce_compressor_perl_1_0_0.tgz

I'm not sure why the Ruby version is maintained separately from the
other versions, and I haven't heard back from Moxiecode yet, so I'm not
sure where this will live permanently.

If anybody has any ideas about that, or any bug fixes etc, please let me
know.

To use it, you need to
- install : File::Spec, Digest::MD5 and Compress::Zlib
- untar tinymce_compressor_perl_1_0_0.tgz in the tinymce directory
- create the directory 'cache' in the tiny_mce dir, and make it writable
  by apache
- set up your webserver to serve tiny_mce_gzip.pl as a CGI script or
  using mod_perl (example in the README)

If you find any issues or can suggest any improvements (for instance, a
better example of using it with mod_perl?), please send them to me -
I'll be happy to fix them.

Clinton Gormley