[wp-hackers] Replacing TinyMCE with Xinha

Computer Guru computerguru at neosmart.net
Wed Nov 29 15:46:29 GMT 2006


I've always wondered why WP used TinyMCE as the WYSIWYG editor. It doesn't
result in the best code, it's not 100% xhtml compatible, it's not _that_
"tiny," and most importantly, there are better alternatives out there.

I'm currently using Xinha (http://xinha.python-hosting.com/) to add WYSIWYG
support to my commenting form, simply because of how many people throw in
unencoded html characters that cut their post short. It looks great, can be
configured to be even more minimal than TinyMCE, is compatible with all
current-generation browsers AFAIK, and most importantly, by using the new
rendering engine guarantees valid XHTML.

Here's a link to a Xinha-rigged comment form:
http://neosmart.net/blog/archives/291#comment-7324
It looks 100% natural and is very light (unlike FCKeditor), and has full
theming support via CSS (I believe).

It has the same exact feature that has only just been implemented in 2.1:
html and WYSIWYG tabs, switchable via AJAX though.

I use the pure HTML editor for writing posts, but my biggest turn-off in
TinyMCE was how it completely mangled <a> tags, inserting many non-standard
attributes that are absolutely unnecessary and serve no function as far as I
can see but to create trouble and wreck havoc when TinyMCE is pulled (I had
to rewrite all posts done with a WP 1.5 TinyMCE plugin after deleting it and
switching to 2.0 - though that particular issue no longer exists in WP's
TMCE, it _does_ still add non-standard & useless attributes to the <a>
tags).

Moreover, this would be a chance to do something we've long promised and
talked about: removing the WYSIWYG from the actual WP-Core and making it a
plugin.

A plugin for Xinha on WordPress already exists, you may've seen it before:
http://baptiste.us/plugins/xinha4wp

My favorite thing about Xinha is the plugin system for the editor itself,
it's much more straight-forward and *global* than TMCE's current plugin
system and using this might encourage and simplify the use of
editor-plugins. Xinha for WordPress ships with quite a few that are verified
working 100% (I've checked them all on WP 2.1) including PHPSpell/ASpell
support. It has several default plugins that make writing code and accessing
the HTML tags from the WYSIWYG interface without actually switching to the
HTML-view really easy as well.

I'm sure this is going to irk some people off, TMCE has been there for a
while and stuff, but I just think that TMCE has really outlived its purpose.
It was made when the online blogging revolution along with Web 2.0 began,
and it's really just sloppy work compared to some of the more professional
follow-ups, whether they be Xinha or others.

Just food for thought, something to consider, and it's definitely not hard
seeing as the entire GPL'd plugin platform exists. Should this actually be
considered, as simple as reviewing the plugin's code, trashing TMCE, and
shipping WP with Xinha....

(Think of it this way: Way more people will switch to 2.1 when you tell them
there's a new WYSIWYG engine that looks great, has tons of functions, and
produces 100% valid XHTML!!! =P)

Peace,

Computer Guru
NeoSmart Technologies
http://neosmart.net/blog/




More information about the wp-hackers mailing list