[wp-hackers] RTE

Owen Winkler ringmaster at midnightcircus.com
Sat Sep 16 16:00:59 GMT 2006

Robert Deaton wrote:
> On 9/16/06, Owen Winkler <ringmaster at midnightcircus.com> wrote:
>> Option B: 
> I won't mind this, if it can be done in a way where TinyMCE is not
> loaded if my option states I want the regular editor (afaik, nobody
> has done this in a way where TinyMCE isn't loaded normally with the
> rest of the JS; and the UI is _extremely_ unobtrusive, the Write page
> is crowded as it is). Otherwise, I'd rather see C.

I've already resigned myself to not getting what I want (option D - no 
TinyMCE, heh) because it's probably not in the best interests of 
WordPress users at large.  I expect to be able to write a plugin that 
removes the TinyMCE script tag from the write page if it's never used.

Are our Ajax libraries robust enough to handle script execution that 
includes TinyMCE?  In other words, if you have the editor set to come up 
as a text area, then you hit the toggle, can it not only replace the 
textarea but add the additional TinyMCE support script?

Prototype has script execution features for this sort of thing, but all 
of the script is evaluated, so you can't declare functions normally, you 
have to write them as:

myfunction = function(...) {...}

I doubt TinyMCE's code looks like this, and I'm not sure what happens if 
you just dump script tags into the replaced HTML.  Nothing?  Bedlam?

There would also need to be a check for TinyMCE to make sure that it 
doesn't load twice if the area was toggled twice.  ("Let's see if the 
WYSIWYG editor can do something here...  Oh, that's no good switch 
back...  What's all this HTML in my textarea???...  Oh, crap, two 

Perhaps a better solution would be to make TinyMCE the full-time default 
for supported browsers, and then plug in its removal either entirely or 
by added options somewhere.  /me waits for upheaval.


More information about the wp-hackers mailing list