Project

General

Profile

Bug #23334 » rtehtmlarea_bugfix_15326_trunk.patch

Administrator Admin, 2010-08-26 03:07

View differences:

typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
}
// Register RTE windows
$this->TCEform->RTEwindows[] = $PA['itemFormElName'];
$textAreaId = htmlspecialchars($PA['itemFormElName']);
$textAreaId = htmlspecialchars(preg_replace('/\[|\]/', '_', $PA['itemFormElName']));
// Check if wizard_rte called this for fullscreen edtition; if so, change the size of the RTE to fullscreen using JS
if (basename(PATH_thisScript) == 'wizard_rte.php') {
......
$this->TCEform->additionalJS_post[] = $this->registerRTEinJS($this->TCEform->RTEcounter, $table, $row['uid'], $field, $textAreaId);
// Set the save option for the RTE:
$this->TCEform->additionalJS_submit[] = $this->setSaveRTE($this->TCEform->RTEcounter, $this->TCEform->formName, $textAreaId);
$this->TCEform->additionalJS_submit[] = $this->setSaveRTE($this->TCEform->RTEcounter, $this->TCEform->formName, $textAreaId, $PA['itemFormElName']);
$this->TCEform->additionalJS_delete[] = $this->setDeleteRTE($this->TCEform->RTEcounter, $this->TCEform->formName, $textAreaId);
// Draw the textarea
......
* @param integer $RTEcounter: The index number of the current RTE editing area within the form.
* @param string $formName: the name of the form
* @param string $textareaId: the id of the textarea
* @param string $textareaName: the name of the textarea
*
* @return string Javascript code
*/
function setSaveRTE($RTEcounter, $formName, $textareaId) {
return 'if (RTEarea["' . $textareaId . '"]) { document.' . $formName . '["' . $textareaId . '"].value = RTEarea["' . $textareaId . '"].editor.getHTML(); } else { OK = 0; };';
function setSaveRTE($RTEcounter, $formName, $textareaId, $textareaName) {
return 'if (RTEarea["' . $textareaId . '"]) { document.' . $formName . '["' . $textareaName . '"].value = RTEarea["' . $textareaId . '"].editor.getHTML(); } else { OK = 0; };';
}
/**
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (copie de travail)
// Register RTE windows:
$this->TCEform->RTEwindows[] = $PA['itemFormElName'];
$textAreaId = htmlspecialchars($PA['itemFormElName']) . '_' . strval($this->TCEform->RTEcounter);
$textAreaId = htmlspecialchars(preg_replace('/\[|\]/', '_', $PA['itemFormElName'])) . '_' . strval($this->TCEform->RTEcounter);
// Register RTE in JS:
$this->TCEform->additionalJS_post[] = $this->registerRTEinJS($this->TCEform->RTEcounter, '', '', '',$textAreaId);
(1-1/3)