•      
  • Garbage Burrito!An online internet web blog by Ben Kittrell
  • Blog
  • Tweets
  • Contact
  • Photos
  • Favorite Burrito
  • Burrito Shop
  • Cart
  • Login
  •      
 View Cart Register Login        

Garbage Burrito!

An online internet web blog by Ben Kittrell

  • Blog
  • Tweets
  • Contact
  • Photos
  • Favorite Burrito
  • Burrito Shop

 About Ben

Co-Founder of Doodlekit. Coder, Home Renovator, Enjoyer of Refreshing Beverages.

Sometimes I blog here, sometimes on Doodlekit, sometimes I tweet and now I podcast.

Most recently I've been doing software development strategy consulting for Kansas City businesses.  

 Doodlekit

Doodlekit is the easiest way for small businesses to create their own website.  Used by millions in over 180 countries.

Follow us for updates.

Doodlekit on Twitter
AngelList
LinkedIn
Facebook

160x600.gif

free website builder

 

 Blog Entries

  • Great Review of Doodlekit by Comparakeet
  • New Podcast Episode - Danny O'Neill - The Roasterie - Spare Room Radio
  • What I Wish Someone Told Me Before I Started Buying Podcast Equipment
  • Announcing Spare Room Radio - New Podcast
  • Google Fiber Experiment: Cloud Video Transcoding
more  

 Blog Comments

  • Newt Scamander Coat Replica: Great Review of Doodlekit by Comparakeet
  • status: Calling for a better HTML File Input
  • ASWIN: Doodlekit 2.0
  • special day: What I Wish Someone Told Me Before I Started Buying Podcast Equipment
  • Business management assignment: Save Some Code for Later with Ruby Procs
more  

 Links


  • website reviewer
  • live on - sharing memories
  • kids website builder
  • resume website
  • martial arts website builder
  • affiliate website builder
  • teacher website

 Login

 Forgot Password?
 Register

 Forum Posts

  • rajablogid: RE: Stupid Simple, Yet Effective
  • JohnFGlenn: RE: Stupid Simple, Yet Effective
  • Ben Kittrell : RE: Stupid Simple, Yet Effective
  • Ben Kittrell : RE: Stupid Simple, Yet Effective
  • Kevin Perdue: RE: Stupid Simple, Yet Effective
more  

 Custom Login

 Forgot Password?
 Register

 Back to Blog

TinyMCE GZip Compressor Ruby on Rails Plugin - Take 2

Ben Kittrell
 10/13/2006 08:33PM

UPDATE: I've finally added conditional Gzip compression. See TinyMCE GZip Compressor Ruby on Rails Plugin  - Take 3 .

After posting in the TinyMCE forums about my GZip Compressor, Spocke let me know that they revamped the other Gzip Compressors, and that I should work off those.  I checked it out and the code is a lot cleaner, so I went ahead and refactored.

This time though I went all out and created it as a plugin.  It supports caching and gzip compression with one caveat.  If you enable caching, then it will always gzip the output.  This means that browsers that don't support gzip will break.  This shouldn't be an issue since any browser that can run TinyMCE should support gzip.  

TinyMCE GZip Compressor Ruby on Rails Plugin

To install it, extract the plugin to vendor/plugins.  The path should look like RAILS_ROOT/vendor/plugins/tiny_mce_gzip.

Add the following line to routes.rb

    TinyMceGzip::Routes.add_routes
    
Change your tiny_mce javascript include to the following.

    <%= javascript_include_tag("tiny_mce/tiny_mce_gzip") %>
    
That's it!

This plugin assumes that TinyMCE is installed in /public/javascripts/tiny_mce.  

Let me know if you have any issues, comments or questions.

 Comments

 Walter McGinnis  10/24/2006 03:50AM 

Does this assume that the other TinyMCE plugin is installed?

 Walter McGinnis  10/24/2006 03:58AM 

D'oh! Didn't see the last line of you post. The other TinyMCE plugin results in this javascript being put under public/javascript/tinymce so that's a pretty good indication that it's required.

Cheers,
Walter

 Walter McGinnis  10/24/2006 04:22AM 

One last comment. I promise. Any chance that you be moving this plugin to a subversion repository? If you don't have or don't want to set up the means, rubyforge seems like a good candidate.

I mention this because I prefer to use subversion with externals for plugins.

Cheers,
Walter

 Ben Kittrell  10/24/2006 12:44PM 

I was going to wait until I had at least a few people's feedback before I start a project. If you can get it working fairly easily, I'll go ahead and set one up.

 Benjamin  10/25/2006 04:16PM 

How does this correctly tie in with the tiny_mce plugin that is located in vendor/plugins/tiny_mce - feel free to email me

 Walter McGinnis  10/26/2006 09:28PM 

I finally smoothed out some bumps with using the TinyMCE plugin with ajaxscaffold generated code (see http://blog.katipo.co.nz/ for details). After I get some other work out of the way, I'll give your code a try.

When I do, I'll let you know how it goes.

Cheers,
Walter

 Eduardo  11/15/2006 07:22AM 

Walter,

You don't need the rails TinyMCE plug-in to use this gzip plug-in.

This plugin (gzip) works fine. Nice job!

 Igor  11/23/2006 01:32AM 

There is no such file in public\javascripts\tiny_mce\tiny_mce_gzip.js !
So <%= javascript_include_tag("tiny_mce\tiny_mce_gzip") %> isn't gonna cut it.
I've copied your file lib\tiny_mce_gzip.js over, but still nothing.
Do I add the routing line anywhere I want in routes.rb?
Do I need to include this plugin somehow maybe?
Thanks!

 Doug Johnston  12/05/2006 09:00PM 

Cool idea! I got it to work and it does shrink the filesize down to a more manageable 65k. It seems to take a little while to gunzip it on the client side though (5-10 seconds) and on fast connections it seems like it might be faster to just download the original. Anyone else experiencing this? The real problem is that during the 5-10 seconds of gunzipping the file, the browser (Firefox 2.0) appears to lockup. It always recovers, but still, that's a rather undesirable effect. Perhaps too, it's that I'm running in development mode. I'll have to test it in production mode with full caching to see if that makes a difference. Regardless, thanks for the great work!

  12/06/2006 11:13AM 

Hi,

Sounds like a great plugin. I cant get it to work unfortunately.

I continually get:
A copy of ApplicationController has been removed from the module tree but is still active!

I was wondering if you might be able to help. Im running PR 1.2.

 Ben Kittrell  12/06/2006 01:32PM 

I have not tried it with Rails 1.2 yet. Let me give it a go and see if I get the same error.

  12/09/2006 07:57AM 

thanks very much.

I could very well be doing something wrong. But the new routing in 1.2 made me think it might be related to the release.

 Ben Kittrell  12/13/2006 01:52AM 

Sorry it took me so long. I tried the plugin using the latest edge, and it seems to work fine. I'll look up that error, but any more information on your end would be helpful.

  12/15/2006 02:01PM 

Ill try it again.

I was just doing something stupid Im sure. Ill let you know.

Thanks again.

 gemp  01/10/2007 07:50AM 

Hi,

Very nice! Tho your package doesn't seem to be available anymore: Page not found...

 Jeff McDonald  02/27/2007 10:19PM 

I get the same error (ArgumentError (A copy of ApplicationController has been removed from the module tree but is still active!):

I'm in the same 'could be my stupid error' camp, but haven't found it yet.

 Ivan Storck My Website  03/01/2007 07:24PM 

I followed all the steps above but I can't figure out how to get the TinyMCE editor to show up for my textarea. Do I need another plugin or another piece of code?

 Ben Kittrell  03/02/2007 12:44AM 

Look at the examples on the TinyMCE website.

http://tinymce.moxiecode.com/example_full.php?example=true

 Tony Jin  03/15/2007 12:03AM 

Great plugin!
However, I found the new added compressing controller "tiny_mce_gzip_js" takes quite some time, which offsets the time saved by downloading the gzip file.

Is there a way to just generate the gzip only once?

Thanks!

 Ben Kittrell  03/15/2007 10:08AM 

Tony,

It should be caching it. I'll look into this a little later.

 Patricia My Website  04/04/2007 02:24AM 

Show !

Very Good !

 nancy  06/27/2007 10:24PM 

I don't know how to use TinyMCE GZip Compressor Ruby on Rails Plugin ,who help me?

 steve My Website  08/22/2007 01:34AM 

This didn't work for me ... I'm pretty sure I know what I'm doing. Did the latest rails release break this?

 Jason My Website  08/29/2007 01:00AM 

I short-term solution to the ApplicationController error is found here http://aspn.activestate.com/ASPN/Mail/Message/rubyonrails-talk/3507571.

 Remi  09/17/2007 10:34PM 

How to disable the TinyMCE for one textarea in my page? I'm using ruby on rails.

Thanks

  10/11/2007 09:59AM 

dfgfdgdfgdfg

 Kindy My Website  10/11/2007 10:02AM 

See You have only 2 provissions. either you can change all textarea to MCE or not. ok.
dont think much bigger :D . cool this foolish plugin made my system go 500 error.
:-(

 Vovka  10/17/2007 02:03PM 

I disabled TinyMCE for one of my textareas!!! Use code like this:

#when intitializing in <header> in rhtml
tinyMCE.init({mode : "textareas", editor_deselector : "mceNoEditor"});
...
#in <body>
<%= text_area 'event_photo_loader', :caption, :size => "20x3", :class => "mceNoEditor" %>

Remi, it's simple! Just set editor_deselector during initialization and use this name in the capacity of class for your form-item. Enjoy Ruby-with-TinyMCE!

 Maximka My Website  11/09/2007 12:48AM 

Very Pizdatiy Post

 antenado My Website  03/31/2008 12:09PM 

very good

 Ilya Shubin My Website  05/14/2008 09:26AM 

O_O Thanks for plugin, Ben.

But what you say about this http://www.example-code.com/ruby/gzip_compressString.asp ?

 impressora hp My Website  05/31/2008 04:51PM 

impressora
impressora hp
impressora laser
impressora multifuncional
cartucho impressora
tinta impressora
tinta de impressora
driver impressora
impressora deskjet
impresora
impressora fiscal
impressora a laser
impressora canon
impressora zebra
impressora laser hp
impressora matricial
impressora xerox
cartuchos impressora
cartucho de impressora
impressora jato de tinta
cartucho impressora hp
cartucho para impressora
tinta para impressora
impressora termica
impressora cd

 Celulite Anti My Website  06/12/2008 02:51AM 

Bermuda AntiCelulite Biocerâmica Infravermelho Longo

 penis grande My Website  10/11/2008 03:09AM 

um super grande

 jericoacora My Website  06/17/2009 12:50AM 

jericoacora is the best of word !

 kirat My Website  01/16/2017 03:45AM 

I want to appreciate your nicely written content its useful and your writing trend helped me to the idea with no difficulty. Gratitude.
http://veherba.com/jus-herbal-amazon-plus/
http://veherba.com/teh-k-muricata/
http://veherba.com/amazon-berries/

 henry  02/25/2018 06:39PM 

You did really good work. I really appreciate your new and different post.
Please guys keep it up and share with us some unique post in the future…https://www.rospedia.com/

 Post a Comment



 Search

Follow On...

  • Facebook
  • Twitter
  • LinkedIn
  • Google+
  • Pinterest
  • RSS Feeds
  • Blog Posts,
  • Blog Comments,
  • Gallery Images,
  • Forum Topics

Copyright © 2006 Garbage Burrito. All Rights Reserved.
hosted by doodlekit™- free website builder

 

 powered by Doodlekit™ Free Website Builder