[TYPO3-core] RFC: #7961: headListTags in class.t3lib_parsehtml_proc.php are hardcoded

Uschi Renziehausen typo3news at otherone.de
Tue Apr 1 22:45:09 CEST 2008


Steffen Kamper wrote:
> "Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag 
> news:mailman.1.1207046402.2316.typo3-team-core at lists.netfielders.de...
>> Hi
>>
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=7961
>>
>> Branches: 4.2
>>
>>
>>
>> the headListTags are hardcoded:
>>    // Static:
>>    var $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD'; //
>> List of tags for these elements
>>
Hi folks,

+1 from me especially after renaming the configuration variable. Please 
note: Without this patch you will not be able to define any custom 
element that is meant as a block element.  It will always be wrapped 
with a p on the transfomation way db->rte and or vice versa!

This is a MUST HAVE in 4.2 in my eyes!

Prosit, Uschi

Regards, Uschi

>> There is no way to add/remove elements to this list.
>>
>> With the attached patch it is possible to do that.
>> Condition: the list should be defined in basic setup of rte, like
>> RTE.default.proc.headListTags = 
>> PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD
>>
>> Then this syntax is useful to add a single element:
>> RTE.default.proc.headListTags := addToList(code)
>>
>> if not, the list can be replaced with RTE.default.proc.headListTags =  ...
>>
>>
>> Additional:
>> the naming is not very well, this list prevents wrapping their elements 
>> with
>> p
>>
>> vg  Steffen
>>
> 
> i renamed "headListTags" to "blockElementList" because this wording says 
> what it is. So it's bit easier to understand rte configuration.
> As this is an important step to get it configurable, it shouldn't be the 
> last one. By reading the parser-class there has to be a rewrite for future 
> because many hardcoded tags and may be unnecessary switches.
> 
> New patch is attached.
> 
> vg  Steffen 
> 
> 
> 


More information about the TYPO3-team-core mailing list