Hallo nochmal,
okay, wie man den RTE in die eigene Extension integriert steht hier:
http://typo3.org/documentation/docum...rent/view/5/1/
So wie das dort zu lesen ist, habe ich das mal umgesetzt. Ich hoffe zumindest, dass ich das habe, jedenfalls funktioniert es nicht. Folgendes habe ich gemacht:
Datei ext_localconf.php PHP-Code:
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_extMgm::addUserTSConfig('options.saveDocNew.user_tariftable_features=1');
t3lib_extMgm::addUserTSConfig('options.saveDocNew.user_tariftable_cat=1');
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.user_tariftable_pi1 = < plugin.user_tariftable_pi1.CSS_editor',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi1/class.user_tariftable_pi1.php','_pi1','list_type',1);
$TYPO3_CONF_VARS['BE']['RTE_reg']['user_tariftable'] = array('objRef' => 'EXT:pi1/class.user_tariftable_base.php:&user_tariftable_base');
Die letzte Zeile ist von mir.
PHP-Code:
<?php
require_once(PATH_t3lib.'class.t3lib_rteapi.php');
class user_tariftable_base extends t3lib_rteapi {
// External:
var $RTEdivStyle; // Alternative style for RTE <div> tag.
// Internal, static:
var $ID = 'rte'; // Identifies the RTE ...
var $debugMode = FALSE; // Debug mode
/**
* Returns true if the RTE is available. Here you check if the browser requirements are met.
* If there are reasons why the RTE cannot be displayed you simply enter them as text in ->errorLog
*
* @return boolean TRUE if this RTE object offers an RTE
*/
function isAvailable() {
global $CLIENT;
if (TYPO3_DLOG) t3lib_div::devLog('Checking for availability...','rte');
$this->errorLog = array();
if (!$this->debugMode) { // If debug-mode, let any browser through
if ($CLIENT['BROWSER']!='msie') $this->errorLog[] = '"rte": Browser is not MSIE';
if ($CLIENT['SYSTEM']!='win') $this->errorLog[] = '"rte": Client system is not Windows';
if ($CLIENT['VERSION']<5) $this->errorLog[] = '"rte": Browser version below 5';
}
if (!count($this->errorLog)) return TRUE;
}
/**
* Draws the RTE as an iframe for MSIE 5+
*
* @return string HTML code for RTE!
*/
function drawRTE(&$pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue) {
// Draw form element:
if ($this->debugMode) { // Draws regular text area (debug mode)
$item = parent::drawRTE($pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue);
} else { // Draw real RTE (MSIE 5+ only)
// Adding needed code in top:
$pObj->additionalJS_pre['rte_loader_function'] = $this->loaderFunc($pObj->formName);
$pObj->additionalJS_submit[] = "
if(TBE_RTE_WINDOWS['".$PA['itemFormElName']."']) { document.".$pObj->formName."['".$PA['itemFormElName']."'].value = TBE_RTE_WINDOWS['".$PA['itemFormElName']."'].getHTML(); } else { OK=0;
/*...*/
// Transform value:
$value = $this->transformContent('rte',$PA['itemFormElValue'],$table,$field,$row,$specConf,$thisConfig,$RTErelPath,$thePidValue);
// Register RTE windows:
$pObj->RTEwindows[] = $PA['itemFormElName'];
$item = '
'.$this->triggerField($PA['itemFormElName']).'
<input type="hidden" name="'.htmlspecialchars($PA['itemFormElName']).'" value="'.htmlspecialchars($value).'" />
<div id="cdiv'.count($pObj->RTEwindows).'" style="'.htmlspecialchars($RTEdivStyle).'">
<iframe
src="'.htmlspecialchars($rteURL).'"
id="'.$PA['itemFormElName'].'_RTE"
style="visibility:visible; position:absolute; left:0px; top:0px; height:100%; width:100%;"></iframe>
</div>';
}
// Return form item:
return $item;
}
}
?>
Das ist das PHP Skript aus der Dokumentation.
Wenn ich jetzt im RTE-Feld meiner Extension einen Custom Tag eingebe, klappt das aber noch immer nicht. Aus < und > wird immernoch < und >.
Was habe ich falsch gemacht / übersehen?
Viele Grüße
dasNom