[Zope-CMF] Discussion item reply using plain text rather than structured text

marc lindahl marc@bowery.com
Wed, 24 Oct 2001 13:07:16 -0400


> From: Jeffrey P Shell <jeffrey@cuemedia.com>
>
> Because sometimes, especially under column constraints
> (such as those encountered in tight TEXTAREA setups),
> you want to do linebreaks naturally to stay even.
> 
> The mode I use on EMacs for example does nice line
> breaks and indentations automatically
> 
> Now if the above were rendered in a web page with <br>'s at every
> break, it would fill in a very tiny portion of the available real
> estate for two logical paragraphs that should be able to flow as
> naturally as paragraphs flow.

But the vast majority of users don't even know what EMacs is.... they'll be
using whatever TTW form is provided.  By making the TEXTAREA box the same
basic size (width anyway) of the rendered page, plain text will provide a
WYSIWYG view of unformatted text (that seems like a pretty usability
guideline).  From the mission statement of structured text, that seems like
it should be the starting point...


> Note that DTML has a "newlines-to-br" functionality.  This is often
> adequate for letting non-STX users to fill in paragraphs as big
> long lines in <TEXTAREA> spaces and still keep some degree of very
> simple formatting.
> 
> <dtml-var users_text newline_to_br>

Interesting.... this could be the way to provide another radio-button option
- plain text (in addition to structured text and html)


> Personally, I've long wished for the text handling functionality
> for Text based content (of any kind) in the CMF to be fully
> extracted from the Document class itself.  In my view, there would
> be a StructuredTextHandler, an HtmlHandler, and perhaps a
> PlainTextHandler.  By abstracting the text handling out of the
> document class itself, it would allow for different handlers to be
> written and installed.

It would also, probably, make it easier to debug the handlers.  I haven't
investigated in detail, but from using it, it's clear to me that the state
machine in the structured text handler has some bugs in it.