Evan Martin (evan) wrote in lj_dev,
Evan Martin
evan
lj_dev

free text autoformatting

When you have a textarea (multiline text box) in an S2 customization page, how should it behave with respect to linebreaks?

Options:
  1. Require HTML. Bad because it confuses people... the common case is for people to want linebreaks to show up in the result.
  2. Always insert <br/> tags for linebreaks. Bad because it breaks stuff like newlines in bullet lists¹.
  3. Add a “preformatted” checkbox like the rest of LJ. Bad because (I think) we don’t have the infrastructure for properties on properties. It also feels needlessly complicated.
  4. Try to do something intelligent based on whether they used <p> tags. Bad because trying to be intelligent usually breaks in some way.

I like #4, but only because I don’t know its limitations.

(Update: also, the bio on the userinfo page is the comparable form we already have, which appears to do #2.)

(Update 2: er, it doesn’t appear to allow HTML anyway, so I guess that answers itself.)

1 This is a bug, really, but there are other cases where someone may not want LJ’s autoformatting.
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 17 comments