0 results found

JSP

Contribute to this page

TinyMCE Compressor gzips all JavaScript files in TinyMCE into a single streamable file. This makes the overall download size 75% smaller, and the number of requests will also be reduced. The overall initialization time for TinyMCE will be reduced dramatically if you use this script.

Installation

Here is a step by step list on how to install the GZip compressor.

  1. Copy the tiny_mce_gzip.js and tiny_mce_gzip.jsp to the tiny_mce directory (i.e., the same directory that contains the tiny_mce.js file).
  2. Remove the current script tag.
  3. Add the new new GZip script .
  4. Add the new GZip initialization call that will tell the compressor what to include in the output. This should be the sum of all the themes and plugins required by the implementation.

Example of initialization

The example below will pack both themes and all plugins into one file/stream. Remove the things you don't need or add your custom plugins to the settings below. Remember that the tinyMCE_GZ.init call must be placed in its own script tag.

<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_gzip.js"></script>
<script type="text/javascript">
tinyMCE_GZ.init({
    plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu',
    themes : 'simple,advanced',
    languages : 'en',
    disk_cache : true,
    debug : false
});
</script>
<script type="text/javascript">
tinyMCE.init({
    .. your normal init ..
});
</script>

Troubleshooting

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.