[Pmwiki-users] beginners figh - linebreaks - usabilty

Steven Leite steven_leite
Sun May 23 09:50:13 CDT 2004


> I'm wondering why a "linebreak" in a textarea (in pmwiki and other SW)
> is not converted to a linebreak (as <br\>.
> I my opinion, that would be much more intuitive and userfriendly.
>
> Is it a question of crossplatform compatibility? (LF,CR..)  as the
> target platform is not necessarily known.
> An idea might be, to convert a "linebreak":  to \\"linebreak" after
> "Enter" the first time.

Just add this to your config.php

  $InlineReplacements["/&lt;&lt;/"] = "<br \>";  // << = <br>
  $HTMLLineBreak='<br />';
  $DoubleBrackets['/\\[\\[linebreaks\\]\\]/e'] =
'$GLOBALS["HTMLLineBreak"]="<br />"';
  $DoubleBrackets['/\\[\\[nolinebreaks\\]\\]/e'] =
'$GLOBALS["HTMLLineBreak"]=""';


Now you have control of this behaviour.  [[linebreaks]] turns it on.
[[nolinebreaks]] turns it off.

-S




More information about the pmwiki-users mailing list