Feature #17757 » rtehtmlarea_bugfix_inlinedefault_remap.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy) | ||
---|---|---|
// Transform value:
|
||
$value = $this->transformContent('rte',$PA['itemFormElValue'],$table,$field,$row,$specConf,$thisConfig,$RTErelPath,$thePidValue);
|
||
|
||
// Change some tags
|
||
if ($this->client['BROWSER'] == 'gecko') {
|
||
// change <strong> to <b>
|
||
$value = preg_replace('/<(\/?)strong/i', "<$1b", $value);
|
||
// change <em> to <i>
|
||
$value = preg_replace('/<(\/?)em([^b>]*>)/i', "<$1i$2", $value);
|
||
foreach ($this->registeredPlugins as $pluginId => $plugin) {
|
||
if ($this->isPluginEnabled($pluginId) && method_exists($plugin, "transformContent")) {
|
||
$value = $plugin->transformContent($value);
|
||
}
|
||
}
|
||
if ($this->client['BROWSER'] == 'msie') {
|
||
// change <abbr> to <acronym>
|
typo3/sysext/rtehtmlarea/extensions/DefaultInline/class.tx_rtehtmlarea_defaultinline.php (working copy) | ||
---|---|---|
$registerRTEinJavascriptString = '';
|
||
return $registerRTEinJavascriptString;
|
||
}
|
||
|
||
/**
|
||
* Return tranformed content
|
||
*
|
||
* @param string $content: The content that is about to be sent to the RTE
|
||
*
|
||
* @return string the transformed content
|
||
*/
|
||
public function transformContent($content) {
|
||
|
||
// Change the strong and em tags for gecko browsers
|
||
if ($this->htmlAreaRTE->client['BROWSER'] == 'gecko') {
|
||
// change <strong> to <b>
|
||
$content = preg_replace('/<(\/?)strong/i', "<$1b", $content);
|
||
// change <em> to <i>
|
||
$content = preg_replace('/<(\/?)em([^b>]*>)/i', "<$1i$2", $content);
|
||
}
|
||
|
||
return $content;
|
||
}
|
||
} // end of class
|
||
- « Previous
- 1
- 2
- Next »