What WYSIWYG? Why BUeditor + IMCE still gets my vote

I just decided to try the YUI Rich Text editor, because I had heard nice things about it. However a brief test with it this morning revealed that it produces truly horrible markup!

It doesn't take much editing to start spitting out <span> and <div> tags all over the shop.

Just look at the markup that it produces. <br /><br />This should be a new paragraph not a line break.<br /><br /><span style="background-color: #ff00ff; "><span style="background-color: #a0ff40; "><span style="color: #0000bf; "><span style="font-family: 'Comic Sans MS';">And whatever happened to separation between style and content. Inline CSS is horrid! And do you really want to run the risk of your users choosing COMIC SANS?</span></span></span></span><br /><span style="color: #0000bf; font-family: 'Comic Sans MS';"><br /></span><br><span style="color: #0000bf; font-family: 'Comic Sans MS';"><br /></span><br><br>

Urrrgh!

A much better option would be to teach users the bare minimum of html (this really doesn't take too long) and to add a custom button to provide the extra styles you need in a style sheet.

Using BUeditor with a custom button to apply the hightlighted style would make this even easier. It's a perfect compromise - users get the "look and feel" of a WYSIWYG editor, without the awful markup.

This will be much easier to maintain especially when it comes round to the inevitable re-design in three years time!

<p>Just look at the markup that it produces</p><p>This should be a new paragraph, not a line break</p><p class="highlight">And whatever happened to separation between style and content. Inline CSS is horrid! And do you really want to run the risk of your users choosing comic sans</p>

If you haven't used BUEditor, I suggest you give it a try: http://drupal.org/project/bueditor

Tags:

Comments

Couldn't agree more.
Also, YUI can seem to misbehave if you flip between WYSIWYG and code views and make edits in both.
A nice addition to BUEditor is to use it in conjunction with http://drupal.org/project/textareatabs. That way you can indent your code using the tab key.

Random Image:

More of the beach
Squirrel in Autumn Sunshine
Charlie: Stop that clicking noise
Porth Beach

Pete's tweets (@prbass)

  • RT @datastore Inside the Whole Government Accounts: why are they so bad? http://t.co/83ODc3AB 15 hours 41 min ago
  • Very snowy and TFL still trying to run my bus home. Must be an election year. 2 days 22 hours ago
  • @kanedr but open data won't help a programme built on a false premise. Retraining unemployed people is not going to create job vacancies. 1 week 38 min ago
  • Pow! Take that deficit! I've just paid my tax bill 1 week 14 hours ago