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

Jeffrey P Shell jeffrey@cuemedia.com
Tue, 23 Oct 2001 16:12:08 -0600


>> From: seb bacon <seb@jamkit.com>
>>
>> I have to agree that the stx rules are counterintuitive... is there a
>> design reason for the inability to do a single-spaced line break, I
>> wonder?
>
> I second that wonder!
>

   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.

>> Personally, I've changed my stx to do a <br> on single line breaks.
>
> Can you post your change?

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>

>> However, I'm still not very happy with it, and rather than spend ages
>> doing a fishbowl proposal, etc, I'm tending towards using a WYSIWYG
>> widget for the majority of users (i.e. IE).  I think it will take me
>> quite a while to come up with a STX I'm happy with.
>
> Someone's got to do something...  it's really hard to deal with, 
> and doesn't
> form correctly under NS4.7, which could be NS's fault...

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's not necessarily a huge task, but it's not a small one either.