Ticket #5807 (closed enhancement: fixed)

Opened 7 months ago

Last modified 7 months ago

New gzip compressor for TinyMCE

Reported by: azaozz Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: TinyMCE Version:
Severity: normal Keywords: 2nd-opinion has-patch
Cc:

Description

The default gzip compressor for TinyMCE works good, but half of what it does seems pointless.

- It starts with the server generating some js with php (the init array), then sends it to the browser.

- The browser runs it through couple of js functions, and sends most of it back to the server as a GET request.

- The server then uses the GET vars (that are exactly the same it generated in step 1), gathers the different pieces of TMCE, compresses them and sends them back to the browser.

I don't see the point of sending the init array back and forth, as all the settings the compressor needs to gather TMCE's pieces are available in the beginning. I've put together a script that does all in one step (merged tiny_mce_config and tiny_mce_gzip). It's a bit faster, a bit more reliable (eliminates possible errors in the first two steps), and will eliminate some of the problems with TMCE when the browser uses cached copy of the init array.

To implement this in WordPress we will have to change two actions into filters. This will break a few plugins, so I've made compatibility function that capture the output (the actions are outputting js) and insert it into the gzipped file.

It also includes new filter for adding external plugins to TinyMCE and has option to save the gzipped file to disk for faster processing.

Attachments

new-mce-compressor.patch (27.6 kB) - added by azaozz on 02/09/08 22:19:07.

Change History

02/09/08 22:19:07 changed by azaozz

  • attachment new-mce-compressor.patch added.

02/10/08 00:47:54 changed by ev3rywh3re

I haven't tested this patch, but I did want to comment that this does look like a good start to cleanup the TinyMCE init sequence. I was pleased to see the addition of an filter for external plugins since this may help to standardize the method used by plugin authors that want to add buttons and functions to the editor.

02/11/08 17:37:47 changed by andy

Looks good.

02/11/08 17:45:18 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6789]) New gzip compressor for TinyMCE from azaozz. fixes #5807

02/11/08 19:22:23 changed by ryan

(In [6790]) tinyMCE compressor additions and deletion of unused lang files. Props azaozz. see #5807

02/11/08 20:19:30 changed by ryan

(In [6791]) tinyMCE compressor update from azaozz. see #5807