(this page is translated by Google; We're working hard on a human translation)
Basic Skills
How do I reformat the text to HTML? Simply include the code library texy.php (or texy.compact.php) and create object $texy = new Texy; .
The entire transfer method procure $html = $texy->process($text) , where the variable $text contains the input text and returns formatted HTML output.
// vložíme knihovnu
require_once 'texy.php' ;
// vytvoříme objekt
$texy = new Texy();
// můžeme jej nakonfigurovat
$texy ->encoding = 'windows-1250' ;
$texy ->imageModule->root = 'images/' ;
// a zpracujeme vstupní $text
$html = $texy ->process( $text ); If you need to format a single line (ie, no block elements), use $html = $texy->process($text, TRUE) .
In this example you can see how you can object $texy configure. Because a lot of parameters are divided into logical units called modules. Instances of each module is stored in the attribute $texy->blockModule , $texy->emoticonModule etc. (see individual modules ).





