Alternatives to Rich Text Editor using CSS
  • Hey All-- just sharing a tip with implementing line breaks. If you are only using the Rich Text Structure for client-friendly line break capabilities, this is overkill and you may achieve the same effect with the Basic Text Structure using the CSS white-space property (personally I prefer pre-line):

    normal
    Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default

    nowrap
    Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a <br /> tag is encountered

    pre
    Whitespace is preserved by the browser. Text will only wrap on line breaks Acts like the <pre> tag in HTML

    pre-line
    Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks

    pre-wrap
    Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks

    inherit
    Specifies that the value of the white-space property should be inherited from the parent element

    source: http://www.w3schools.com/css/pr_text_white-space.asp

  • 1 Answer sorted by
  • Sweet, thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion