documentation for TinyMCE compressor is lacking
| Project: | TinyMCE WYSIWYG Editor |
| Version: | 5.x-1.x-dev |
| Component: | Documentation |
| Category: | task |
| Priority: | critical |
| Assigned: | kreynen |
| Status: | closed |
Jump to:
This should go to the TinyMCE module's documentation:
A common observation with the TinyMCE editor is that your site, under certain TinyMCE settings and conditions, can slow down quite dramatically. This is because TinyMCE will be pushed to your browser every time it is called. Apparently, TinyMCE will be pushed to the browser even if there is no text area that it could use, resulting in some speed problem with your site.
A very easy fix is the installation of the TinyMCE compressor AND the editing of one particular configuration switch inside tiny_mce_gzip.php:
Change
$diskCache = false; // If you enable this option gzip files will be cached on disk.
to this:
$diskCache = true; // If you enable this option gzip files will be cached on disk..
This makes TinyMCE be 1. compressed and 2. be held in your browser's local cache for a definable periode of time (which can be set in the same file).
Now you will only experience the transfer and loading of TinyMCE the first time until it resides in your browser's cache and from then it is instantly there when needed, no preloading of the editor any more, boosting the speed of page rendering in your browser tremendously!
A blog entry on this can also be found here.

#1
Created as a book page here: http://drupal.org/node/67217
Probably also a good addition to INSTALL.txt or elsewhere within the module itself.
#2
Kewl! ;-) Thanks Boris.
#3
When installing compression for tiny_mce, where does this change need to be made?
#4
where do you see these instructions to switch the scripts? the INSTALL.txt that comes with the 4.7 version says only:
6. To boost the performance of TinyMCE, download the "TinyMCE compressor" from:
http://tinymce.moxiecode.com/download.php
Place the tiny_mce_gzip.php file in
modules/tinymce/tinymce/jscripts/tiny_mce
#5
These instructions are from the install file for the tincymce compressor. It says to place the file in the directory (same as the Drupal module instructions), but also instructs that this change should be made. Maybe it isn't relevant to a Drupal installation of tinymce, but I thought there might be somewhere that Drupal needs this change as well?
#6
Anyone who has this working: can you confirm if the above change is not needed? Thanks.
#7
I have been using TinyMCE with the gzip module installed, but honestly I haven't checked that it's being used!
I followed exactly the instructions in the install file- I did not change anything in page.tpl.php, etc.
Ok, yes! I just checked here's from the page source of my site:
<script type="text/javascript" src="/modules/tinymce/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php"></script>#8
I am getting a message about compression everytime I load tinymce in Internet Explorer: "Tinymce was compressed 17%. Output cache file... modules/tinymce/tinymce/jscripts/tinymce...gz
I enableed debugging and then turned it off-- in the tiny_mce_gzip.php file. I've tried clearing my drupal cache, deleting and reinstalling the tiny_mce_gzip.php file (after turning debug off). Firefox doesn't display this message. Any advice on how to clear out this message?
#9
No need to change anything else in Drupal. tinymce.module will check if tiny_mce_gzip.php exists, and in that case the compression will be used automatically. Otherwise, it's the tiny_mce.js that will be used. Check the header of html code of your page to see which file is used.
#10
Thanks. I believe that answers my question fully and I do have this working. Should some explanation be added to the documentation for the Drupal Tinymce module?
#11
#12
http://drupal.org/node/130306
#13
The documentation has already been updated for compressor versions before 1.1.0
But, it will definitely need to be updated when compressor 1.1.0 compatibility is fixed. See http://drupal.org/node/110761
#14
The INSTALL.txt docs have been updated for compressor version 1.0.9 and greater. Again see the patch at http://drupal.org/node/110761
#15