Zýraznenie syntaxe typosciptu
Tieto dva riadky v našom module zabezpečia výpis obsahu premennej $this->code ako kód typoscriptu:
$this->TSparser = t3lib_div::makeInstance('t3lib_TSparser');
$this->code = $this->TSparser->doSyntaxHighlight( $this->code, '' ,0 );
Do CSS súboru treba nakopírovať farby syntaxe (inak výsledok uvidíme "čienobielo"):
/* TypoScript Highlighting */
PRE.ts-hl { font-size: 11px; font-family: "Lucida Console", "Lucida Sans Typewriter", "Bitsream Vera Sans Mono", monospace; }
PRE.ts-hl .ts-prespace {}
PRE.ts-hl .ts-objstr_postspace {}
PRE.ts-hl .ts-operator_postspace {}
PRE.ts-hl .ts-operator { color: black; font-weight: bold; }
PRE.ts-hl .ts-value { color: #cc0000; }
PRE.ts-hl .ts-objstr { color: #0000cc; }
PRE.ts-hl .ts-value_copy { color: #006600; }
PRE.ts-hl .ts-value_unset { background-color: #66cc66; }
PRE.ts-hl .ts-ignored { background-color: #66cc66; }
PRE.ts-hl .ts-default { background-color: #66cc66; }
PRE.ts-hl .ts-comment { color: #666; font-style: italic; }
PRE.ts-hl .ts-condition { background-color: maroon; color: #fff; font-weight: bold; }
PRE.ts-hl .ts-error { background-color: yellow; border: 1px red dashed; font-weight: bold; }
PRE.ts-hl .ts-linenum { background-color: #eee; }
| Žiadne dokumenty ani odkazy k tejto stránke. | ||
Generátor typoscriptu
Vytvára typoscript pre bežné použitie. Generátor je jednoduchý na obsluhu, stačí vyplniť zopár položiek formulára.