[TYPO3-rte] Problems with RTE while fronted Editing

Eike Starkmann starkmann at undkonsorten.com
Fri Jan 28 18:10:07 CET 2011


Hi,
was my intent, but now its here. I don't know if this is a clever code
but its just an example.

Regards, Eike

Am 28.01.2011 17:45, schrieb Stanislas Rolland:
> Hi Eike,
> 
> Good to know that this is resolved.
> 
> Please post your solution in the RTE new list (perhaps it was your
> intent, but it did not get there).
> 
> I will update the API manual to make this clear.
> 
> Kind regards,
> Stanislas
> 
> 
> 
> Le 2011-01-28 11:33, Eike Starkmann a écrit :
>>
>> Am 18.01.2011 05:00, schrieb Stanislas Rolland:
>>> Hi Eike,
>>>
>>> Make sure that marker ###ADDITIONALJS_PRE### appears only once in your
>>> html template (before both forms).
>>>
>>> Stanislas
>>>
>>> P.S. I note that the two fields have the same name attributes. This is
>>> fine only if they are inside different form elements.
>>>
>> That was a good hint!
>> Thanks a lot.
>> But there was also a problem that the ###ADDITIONALJS_POST###.
>> I understood it right then all RTE's should be between
>> ###ADDITIONALJS_PRE### and ###ADDITIONALJS_POST###.
>> Not it is working for me.
>>
>>
>> Thanks, Eike
>>
>> Here is the Code in somebody else is interested in it:
>>
>> $this->conf=$conf;
>> $this->pi_setPiVarDefaults();
>> $this->pi_loadLL();
>> $this->RTEObj = t3lib_div::makeInstance('tx_rtehtmlarea_pi2');
>> $this->formName = 'prexperts';
>>
>>
>> $this->RTEcounter++;
>> $this->formName = 'rtetestform';
>> $this->strEntryField = 'description';
>> $this->PA['itemFormElName'] = 'tx_cal_controller[description]';
>> $this->PA['itemFormElValue'] = '';
>> $this->thePidValue = $GLOBALS['TSFE']->id;
>> $RTEItem =
>> $this->RTEObj->drawRTE($this,'',$this->strEntryField,$row=array(),
>> $this->PA, $this->specConf, $this->thisConfig, $this->RTEtypeVal, '',
>> $this->thePidValue);
>> $sims['###ADDITIONALJS_PRE###'] = $this->additionalJS_initial.'
>> 		<script type="text/javascript">'. implode(chr(10),
>> $this->additionalJS_pre).'</script>';
>> $sims['###ADDITIONALJS_POST###'] = '<script type="text/javascript">'.
>> implode(chr(10), $this->additionalJS_post).'</script>';
>> $sims['###ADDITIONALJS_SUBMIT###'] = implode(';',
>> $this->additionalJS_submit);
>>
>> $content='
>> <h3>This is a form:</h3>'.$sims['###ADDITIONALJS_PRE###'].'
>> <form name="rtetestform"
>> action="'.$this->pi_getPageLink($GLOBALS['TSFE']->id).'" method="POST"
>> onsubmit="'.$sims['###ADDITIONALJS_SUBMIT###'].'">
>>         '.$RTEItem.'
>>         <input type="submit" name="'.$this->prefixId.'[submit_button]"
>> value="'.htmlspecialchars($this->pi_getLL('submit_button_label')).'">
>> 	</form>
>> 	<br />';
>>
>> $this->RTEcounter++;
>> $this->formName = 'rtetestform2';
>> $this->strEntryField = 'description';
>> $this->PA['itemFormElName'] = 'tx_cal_controller[description]';
>> $this->PA['itemFormElValue'] = '';
>> $this->thePidValue = $GLOBALS['TSFE']->id;
>> $RTEItem =
>> $this->RTEObj->drawRTE($this,'',$this->strEntryField,$row=array(),
>> $this->PA, $this->specConf, $this->thisConfig, $this->RTEtypeVal, '',
>> $this->thePidValue);
>> $sims['###ADDITIONALJS_PRE###'] = $this->additionalJS_initial.'
>> 		<script type="text/javascript">'. implode(chr(10),
>> $this->additionalJS_pre).'
>> 		</script>';
>> $sims['###ADDITIONALJS_POST###'] = '
>> 		<script type="text/javascript">'. implode(chr(10),
>> $this->additionalJS_post).'
>> 		</script>';
>> $sims['###ADDITIONALJS_SUBMIT###'] = implode(';',
>> $this->additionalJS_submit);
>>
>> $content.='
>> <h3>This is a form:</h3>
>> <form name="rtetestform2"
>> action="'.$this->pi_getPageLink($GLOBALS['TSFE']->id).'" method="POST"
>> onsubmit="'.$sims['###ADDITIONALJS_SUBMIT###'].'">
>>         '.$RTEItem.'
>>         <input type="submit" name="'.$this->prefixId.'[submit_button]"
>> value="'.htmlspecialchars($this->pi_getLL('submit_button_label')).'">
>> 	</form>'.$sims['###ADDITIONALJS_POST###'] .'
>> 	<br />';
>>
> 


More information about the TYPO3-project-rte mailing list