termlib.js home | multiple terminals | parser | faq | documentation | samples
Text Wrap Sample
> open terminal  

> show wrap tests 

> tests without wrap 

> read some Kant 

(c) mass:werk,
N. Landsteiner 2005-2007

Introducing Text Wrapping

Version 1.3 of "termlib.js" proudly introduces text wrapping.

For compatibility text wrapping is off by default.
To enable text wrapping globally set the property "wrapping" of your configuration-object to true.

To change wrapping at run-time do one of the following:

  • call myterm.wrapOn() to enable text wrapping.
  • call myterm.wrapOff() to disable text wrapping.
  • set the boolean value of the flag "wrapping" to turn wrapping on/off.

Please note that text wrapping works with the write() method only.

Wrapping behavior can be configured on a per-character basis in TermGlobals.wrapChars (see readme.txt sect 4.11).

"termlib.js" also supports conditional or "soft" word breaks.
In default configuration use <form feed> (\f) for a conditional word break.