Spravne nastaveni Texy v Nette
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- saimons
- Člen | 293
Omlouvam se, ze moje otazka je trochu mimo tema, snad mi to prominete.
Chtel bych se zeptat jak spravne nastavyt Texy, aby nebyly podporovane skoro zadna syntaxe formatovani textu, chtel bych povolit jen preformatovavani url adres. Snazil jsem se o to nastavit jednotlive moduly na FALSE, ale nefunguje mi to spravne.
class MyTexy extends Texy
{
public function __construct()
{
parent::__construct();
// output
$this->setOutputMode(self::HTML5);
$this->encoding = 'utf-8';
$this->htmlOutputModule->removeOptional = false;
self::$advertisingNotice = false;
// headings
$this->headingModule->balancing = TexyHeadingModule::FIXED;
// phrases
$this->allowedTags = Texy::NONE;
$this->allowedStyles = Texy::NONE;
$this->allowedClasses = Texy::NONE;
$this->allowed['blocks'] = FALSE;
$this->allowed['blockquote'] = FALSE;
$this->allowed['emoticon'] = FALSE;
$this->allowed['figure'] = FALSE;
$this->allowed['heading/underlined'] = FALSE;
$this->allowed['heading/surrounded'] = FALSE;
$this->allowed['horizline'] = FALSE;
$this->allowed['paragraph'] = FALSE;
$this->allowed['html/tag'] = FALSE;
$this->allowed['html/comment'] = FALSE;
$this->allowed['script'] = FALSE;
$this->allowed['phrase/strong'] = FALSE;
$this->allowed['phrase/title'] = FALSE;
$this->allowed['phrase/em'] = FALSE;
$this->allowed['phrase/i'] = FALSE;
$this->allowed['script'] = FALSE;
...
Nevim jak omezit treba vkladani kurzivy $this->allowed[‚phrase/title‘] = FALSE; tohle mi funguje, ale $this->allowed[‚phrase/em‘] = FALSE; uz ne. Jak se to da nak globalne vypnout a treba jen povolit vkladani odkazu? Diky.