[TYPO3-core] RFC #9613: RTE uses JScodeLibArray to insert CSS

Jeff Segars jsegars at alumni.rice.edu
Wed Oct 22 18:09:46 CEST 2008


Stanislas Rolland wrote:
> Hi Masi,
>>>
>>> Problem:
>>> JScodeLibArray was used to move some RTE style sheet inclusions to the
>>> head part of the document. However, the template object did not exist
>>> when frontend editing.
>>>
>>> Solution:
>>> The attached patch adds array $additionalHeaderData to class template,
>>> and uses it to add the additional head section content needed by the
>>> RTE.
>>
>> Hm, didn't we try to get rid of "magic arrays" in template.php? Do I get
>> it correctly that the code added to the header is dependent on some
>> configuration and therefore cannot be added via the library loader
>> mechanism?
> 
> That's the point. What is being added here is not a library but link 
> tags for style sheet inclusion required by the RTE.
>>
>> Sidenote, I think it would make more sense to add custom code after the
>> libaries. So you can do something with the code that has been added. Or
>> do you think you'll want to set a config variable for a library
>> beforehand more often?
>>
> I added the $additionalHeaderData at the same location where 
> similarly-named array is added in the frontend.
> 
> Stanislas

Thanks for the quick fix :) +1 based on testing.

Personally, I'd prefer a wrapper method like what Olly did in #9608 
rather than setting the array directly, but the change does work and 
makes the additionalHeaderData similar between  frontend and backend.

Thanks,
Jeff


More information about the TYPO3-team-core mailing list