logo

Database nearing completion

Simple FormThe 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.

  1. 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.
  2. Mozilla uses an IFrame to create the editor. For some reason this seems to "break" the browser's back button!
  3. 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?
  4. 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.

Comments

  1. Nice work Jake

    • avatar
    • Doug
    • Fri 9 Jul 2004 06:45 AM

    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?

    • avatar
    • Henk
    • Fri 9 Jul 2004 07:12 AM

    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.

    • avatar
    • Jake
    • Fri 9 Jul 2004 07:16 AM

    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...

    • avatar
    • Voytek
    • Fri 9 Jul 2004 07:43 AM

    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.

    • avatar
    • Jake
    • Fri 9 Jul 2004 07:52 AM

    Woops! My fault. Fixed now.

    • avatar
    • Henk
    • Fri 9 Jul 2004 07:59 AM

    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/";

    • avatar
    • Doug
    • Fri 9 Jul 2004 08:19 AM

    Jake: Thanks, the combined form is now working as expected.

    • avatar
    • Jake
    • Fri 9 Jul 2004 08:50 AM

    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...

    • avatar
    • Sourav
    • Fri 9 Jul 2004 09:43 AM

    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...

    • avatar
    • Jake
    • Fri 9 Jul 2004 09:45 AM

    Don't worry Sourav. It's only the "webmaster"'s backend that will be converted. You guys won't know any different.

    • avatar
    • Gaston
    • Fri 9 Jul 2004 12:43 PM

    Jake, you ROCK !

    thanks,

    Gaston

    • avatar
    • Tom
    • Fri 9 Jul 2004 02:05 PM

    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!

    • avatar
    • Henk
    • Fri 9 Jul 2004 04:38 PM

    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!

    • avatar
    • Chris
    • Fri 9 Jul 2004 06:39 PM

    I like the subliminal "Cool" that you put at the top... as if we didn't already know.

    • avatar
    • Jake
    • Fri 9 Jul 2004 06:48 PM

    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...

    • avatar
    • Gaston
    • Sun 11 Jul 2004 05:17 AM

    Jake,

    Another thing, have you tried fckeditor ?

    {Link}

    The latest release works also with firefox.

    Gaston

    • avatar
    • digger
    • Sun 11 Jul 2004 12:46 PM

    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.

  2. 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.

    • avatar
    • Arjan Kessels
    • Mon 12 Jul 2004 07:46 AM

    Is it possible to use % for the font size instead of pt?

    Arjan

    • avatar
    • James Jennett
    • Tue 13 Jul 2004 05:52 AM

    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.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Fri 9 Jul 2004

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content