Genii Weblog

Marking passthru-HTML in round trip with CoexEdit

Tue 12 Apr 2005, 07:51 AM



by Ben Langhinrichs
I think I have managed to implement a reasonable solution to the difficult request for CoexEdit I mentioned before.  I have modified CoexEdit so that passthru-HTML is marked with a <span class='NotesPassthroughHTML'>Assume this is bolded text<span> would appear as Assume this is bolded text on the web, but as either [<b>Assume this is bolded text</b>] or <b>Assume this is bolded text</b> (indicating that  the pass through HTML attribute is set). depending on the configuration.

This setup solves several different problems:
  1. The HTML is used properly on the web or in the web browser, with the span invisible;
  2. Editors such as FCKEditor can be easily adapted to including this as a named style which can be applied from the web;
  3. It would be an easy extension to pass through Notes specific codes with a similar <span class='NotesPassthrough'> logic;
  4. In the Notes client, the HTML can be seen as desired, but without any modification need to make it round trip; and
  5. Because this is a span with a named class, it is easy to apply CSS so that the marked part can be denoted somehow (with a background color for example.

There is one concession I had to make, which is that the HTML inside the class may be "cleaned up" prior to being shown, so it is not guaranteed that it will be identical to the original, but given that it could also be altered by the web editor itself, this seems a small concession.  All in all, I feel pretty good about it.

(I just wish I could decide whether to go with the standard "passthru" naming, or to be a curmudgeon and insist on "passthrough" - or at least decide to be consistent somehow)

Copyright © 2005 Genii Software Ltd.

What has been said:

No documents found