Database nearing completion
The Domino HTMLArea v1 demo database is just about ready for release. This weekend I will try and put a couple of hours aside and wrap it all up in an article. The first article will probably be the basics. Then I'll milk it with a couple more articles - dealing with customising the editor and making it compatible with the Notes client.
The hard part with this first article is know how to structure it. Obviously it has to cover the how, but how much of the why should I cover? By now you should all know my issues with the various solutions available and why I like HTMLArea so much. In the article I will try and assume no knowledge and cover some of the problems of editing wysiwyg "rich text" HTML in the browser.
What I probably won't cover is some of the problems associated with this editor. For the record I will list a few of them now. If any others show up in the future I will try and log them too.
Doesn't work in combination with the <base href> technique that I love so much. This is a real bind for me as every app I create uses this tag!
Update: Thanks to Henk for letting me know that you simply move the <base> tag below the call to open htmlarea.js.- Mozilla uses an IFrame to create the editor. For some reason this seems to "break" the browser's back button!
- Due probably to the size of the associated JavaScript file, there are occasions when all the onload events fail and the user may see an error and need to refresh. Probably fixable with a setTimeout() call?
- Combined editing with Notes/Browser works but with a few exceptions. HTMLArea and Notes have different opinions on how certain visual elements should be marked-up. They are both pretty good at translating between them but things like ordered lists (<ol>) can cause headaches.
Anyway, leave it with me.
PS: Notice the lovely little icons I've used in the application? I saw them last night on Simplebits.com and just had to buy them. This allows me to use them as I please in any/all my sites. It doesn't allow you to take them out and use the in your own though. Not much I can do about it; just thought I'd do my bit and give you a stern warning.
Nice work Jake
The "combined" form has no editor available when I tested it using Windows 2000 and Internet Explorer 6.0.26. All I get is the plain TextArea field. Any ideas?
The <base href> problem is IE only. The solution is to insert the <base>-tag *after* the HTMLArea script and its configuration.
I don't know if you can accomplish this with Domino, because I don't use it anymore (thankfully :-)
Hope it helps though.
Thanks Steve.
Doug. Not sure. Could be problem 3 from above. See any JavaScript errors? Tried refreshing the page a few times?
Henk. Will try this out. I'm sure the specification says that <base href> *must* be the first item in the head though! I will investigate...
Jake,
I use Firefox 0.9.1 on XP Pro and have the some problem as Doug. Just to let you know.
... and of course excellent work as always.
Woops! My fault. Fixed now.
Jake,
My pages still validate, so I read the spec as follows (between square brackets added by me):
When present, the BASE element must appear in the HEAD section of an HTML document, before any element that refers to an external source [for the browser to correctly resolve its URI]. The path information specified by the BASE element only affects URIs in the document where the element appears.
So I use absolute URI's to load HTMLArea and relative URI's for anything after the <base>-element. Anyway, it works :-)
I forgot to mention that you also have to set the editors baseURL configuration property for this workaround to work.
editor = new HTMLArea("your_htmlarea");
editor.config.baseURL = "http:/ /your_base_url/";
Jake: Thanks, the combined form is now working as expected.
Thanks Henk. Got it working now. Was planning on converting codestore to using the editor and this was the only obstacle. More on that later...
Jake,
Please do not convert codestore in using this editor just for the simple reason that the editor does not work in IE 5.0.
codestore.net is a very popular site. Please do not restrict its access to developers having browsers IE6 and above...
Don't worry Sourav. It's only the "webmaster"'s backend that will be converted. You guys won't know any different.
Jake, you ROCK !
thanks,
Gaston
Running IE6 here and I'm seeing an issue with the back button. Go into a document, click edit, data displays fine, click the back button once, data disappears, click the save button, all the data is gone next time the document is opened. Not sure if it's a browser or application issue.
Other than that quark this is a great application.
Thanks Jake!
You're welcome Jake.
Like I said, I don't use Domino anymore, but I really admire you for the amount and quality of the articles you produce. I like your writing style and I enjoy reading the personal stuff as well.
Thank you!
I like the subliminal "Cool" that you put at the top... as if we didn't already know.
Nothing subliminal about a big yellow star smack bang at the top of a page Chris ;o)
There aren't many words that will fit. "Cool" seemed to fit quite well...
Jake,
Another thing, have you tried fckeditor ?
{Link}
The latest release works also with firefox.
Gaston
Popup windows for inserting links do not work in firefox 0.8. Need to check v0.91. Those popup windows are 'unnavigateable' - I cannot enter URL or focus to input text ares. Color pickers work OK.
What about the attachments? I have put the HTML area onto my form using the agent on this site. For some reason, it doesn't like the upload input element. If I have one with an attachment selected on the page, when I save the document twice from edit mode it puts the name of the attachment into the htmlarea richtext field. The attachment itself disapears.
Is it possible to use % for the font size instead of pt?
Arjan
Just keeping my Domino hand in...
Have you ever mucked about with ie5.5(?)'s and 6's CONTENTEDITABLE tag? I know it's NOT compliant, but it's nice shortcut to have.
Good work of course to keep this all compliant.