[wp-hackers] TinyMCE 3.0 integration

Andrew Ozz admin at laptoptips.ca
Sat Feb 9 22:42:45 GMT 2008


TinyMCE 3.0 final seems to be working well. Over a week since it was
added to trunk and no major bugs reported (yet). However there are
several things that can be improved.

For example: can somebody with experience in dealing with MSOffice
produced html have a look at the configuration of the "Paste" plugin.
There are several options for it and some custom cleanup can be added as
a callback if needed:
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste

I'm also looking in the gzip compressor (tiny_mce_gzip.php). It works 
well, but half of what it does seems pointless.

- It starts with the server generating some js with php (the init 
array), then sending 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 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 there's compatibility 
function that capture the output (the actions are outputting js) and 
insert it into the gzipped file.

http://trac.wordpress.org/ticket/5807

Comments/opinions are welcome :-)




More information about the wp-hackers mailing list