Accessible Rich Text

I have been looking for a rich text editor that I could drop onto a PHP form and that would not break my XHTML strict mark-up. I downloaded a handful of them, and tried various combinations within custom content management widgets that I’ve put together.

What I noticed is that a lot of them still use the <FONT> tag with various formatting attributes. Or worse – they weren’t free. This became something of a pet project.

I found two worth mentioning:

I like this one, and it made a good start with it. It’s based on the Mozilla Rich Text editing API included with Mozilla 1.3+. I spent some time figuring out how to get a MSSQL recordset into the form field via all the document.write gak, and then had to attend to other things. Some time went by before I could pick this up again.

I then discovered the FCKeditor, and was able to implement it within 20 minutes. I chose a simple format, meaning that I didn’t want to give my CMS users a lot of extraneousness options:

FCK Options

The extra option are mostly *not* accessible, but that’s ok. I don’t need them. The site CSS handles the styling – I want my user to be able to quickly input text and have it show up correctly when published. POW!

I did spend a little time looking how to format text myself, thinking it would be easy to use custom CSS classes, since that’s something I usually have full control over and do consistently – I could build them into the editor. I managed to get the several of the buttons done, and started on the text color picker when it was time to move on once again. I hope to return to it, and when I do, I’ll post the code up here. In the meantime, maybe give FCK a spin.