They say that people who encounter something disturbing have a defense mechanism which blocks the memory out. That must have been what happened with me this week. There I was yesterday asking what the best web editor was, when, at the back of my mind, I must have known it was all irrelevant. We are stuck with having our rich-text fields the way Lotus dictate to us. There are workarounds, fudges and hacks but the only real way of editing formatted text in the browser is to use the Domino "solutions".
What my mind had blocked out (for my own good no doubt) was the memory of December last year when I went through exactly the same problem. Remember that? It started on the 9th and lasted over a whole week until I settled with this hack. Yesterday was a painful reminder of the lessons learnt. Yet again I am working on a fixed-price project (more fool me!) and already I've
spent wasted more than enough time working round Domino's shortcomings.
Hopefully, while avoiding the same rant, I can save some of you the hassle with a short summary of the current state of affairs:
If you need to edit formatted text in both the web and the Notes Client then you're only real option is to stick with the Notes options of either the Java Applet or "Best Fit" ActiveX thingy. This I can understand. After all, they need to make sure both sides are compatible and you can't do anything in the web editor that Notes Rich Text can't handle.
If you are only editing the text on the web then there are a few more options. However, if you want unlimited amounts of content in the field (and why wouldn't you really!?), your best option is still to stick with the Notes options. The other option is to employ a few hacks and limit the users to a certain amount of HTML input. When using these hacks you can employ the editor of your choice. Personally I still think the best is HTMLArea which now supports Mozilla + IE and is highly customisable.
The first hack is to not use a rich-text field at all. That's right! Just use a plain multi-value text field. Use New Line as the separator options and you have yourself a textarea element that you can use as an editor. Drawback to this approach is that you're limited to about 14,000 characters.
So, what is the best option? Well, as ever, it depends. If you can convince your client/users they can live with limited input and only need to edit the content on the web then use one of my hacks. Otherwise you're stuck with the damned Notes offerings.
It's a real shame. I know I constantly berate Domino for its shortcomings, but can you really blame me? I want to amaze my clients, rather than simply satisfy them with workarounds to their requirements. It's not a lot to ask! Is Domino not a content-management system? Why then does it fall so short of the mark in this hugely important area.
The problem with Domino is that it won't let us store HTML in rich-text fields. Ok, it will, but it won't recognise it as HTML. Unless Domino expects the content to be HTML (because we opted to use either applet or best-fit option) it will assume it is plain text. Again Domino tries to take all control from us developers. Does it assume us to stupid to ever be able to do anything other than add fields to forms and tick boxes on the option boxes?! Which brings me back to posting this image:
What we need is either a) Lotus to sit up, listen to reason and sort their act out or b) a way to programatically set the MIME type of the field to text/html instead of text/plain.
As it stands, I've spent enough time on this already, the client seems happy with Java Applets and so that's what he will be getting. At least it might mean some repeat business when things go bad with his application. For that Lotus, I thank you!