Bug #46751
closed
HTMLparser - fixAttrib.['class'].list does not assign value
Added by Arno Burkhart over 11 years ago.
Updated over 11 years ago.
Category:
RTE (rtehtmlarea + ckeditor)
Description
Our TYPO3 configuration has the following setup:
lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list = width-100
But if the author assigns any class to the table tag in the RTE the result is an empty class attribute in the frontend:
<table class=" ">
In class HtmlParser on line 828 the class attribute is emptied
$tagAttrib[0][$attr] = '';
but should not, accoording to the TSref HTMLparser_tags fixAttrib.[attribute].list:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/5/#id1555850documentation
In my opinion it has to be
$tagAttrib[0][$attr] = implode(' ', $params['list']).' '.implode(' ', $classes);
which ensures that the values are assigned to the class attribute additionally.
The documentation reads "Attribute value must be in this list. If not, the value is set to the first element."
So, should it not be:
$tagAttrib0[$attr] = $params['list']0;
?
- Status changed from New to Needs Feedback
I think this is a misundertanding.
Your setup specifies that any class assigned to a table tag must be in the list.
Since you have only class "width-100" in your list, any other class will be removed.
There is currently no option of the html parser that would "add" a list of classes to the attribute value.
Ok, you are right. It was a misunderstanding of the TSref documentation.
Maybe there will be such an option in future versions. That would make it possible to set a class to a HTML element for content editors in RTE and set additional a global class for administrtors via TS. Which would be nice.
- Status changed from Needs Feedback to Closed
- Assignee set to Stanislas Rolland
Arno Burkhart wrote:
Ok, you are right. It was a misunderstanding of the TSref documentation.
Maybe there will be such an option in future versions. That would make it possible to set a class to a HTML element for content editors in RTE and set additional a global class for administrtors via TS. Which would be nice.
You may submit a feature request as a separate issue in this bugtracker.
Also available in: Atom
PDF