Skip to content

Instantly share code, notes, and snippets.

@alrnz
Created December 7, 2016 11:03
Show Gist options
  • Save alrnz/bf378fd6e5701e75775d868f89abca36 to your computer and use it in GitHub Desktop.
Save alrnz/bf378fd6e5701e75775d868f89abca36 to your computer and use it in GitHub Desktop.
TYPO3 RTE (and link) parser in PHP
<?php
// parse all rte tags
$output = $this->pi_RTEcssText($text);
// parse only br and a tags
$output = strip_tags($this->pi_RTEcssText($text, '<br><a>');
// parse only links (link-Tag in the RTE)
$this->htmlParser = t3lib_div::makeInstance("t3lib_parsehtml_proc");
$output = $this->htmlParser->TS_links_rte($this->pi_RTEcssText($text));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment