Bug #88303
closedlang-attribute for CKEditor not saved
0%
Description
The file EXT:rte_ckeditor/Configuration/RTE/Processing.yaml already includes this configuration:
processing: ## allowed default attributes allowAttributes: [class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop]
This includes the "lang"-attribute. But when I add this attribute to any tag in the RTE's source code view manually, it get's removed when saving. So my idea was to add this condiguration:
processing: HTMLparser_db: tags: h2: allowedAttribs: - lang p: allowedAttribs: - lang
But the "lang"-attribute still gets deleted when saving.
Updated by Benni Mack almost 5 years ago
- Status changed from New to Needs Feedback
Hey,
where to you add your lang attribute?
Can you provide your full RTE config + the example HTML that you tried out?
Thanks!
Updated by Riccardo De Contardi over 4 years ago
Maybe the solution is to install the "language" CKEditor plugin (already shipped with TYPO3);
I tried the following test with a fresh TYPO3 9.5.x
1) Install the language plugin - the relevant part of the YAML file is:
editor: config: # add the toolbargroup paragraph if needed, it must incude 'bidi' (example taken from Full.yaml configuration file) toolbarGroups: - { name: paragraph, groups: [ list, indent, blocks, align, bidi ] } extraPlugins: - bidi - language # Example of languages configuration: language_list: [ 'he:Hebrew:rtl', 'pt:Portuguese', 'de:German' ]
2) No further configuration ( allowAttributes
, etc)
3)Create a text content element
4) the "language" button is present; you can mark a phrase and use the dropdown to select the language
5) the generated HTML is (for example)
<span lang="he" dir="rtl">Lorem ipsum dolor sit amet</span>
Updated by Riccardo De Contardi over 4 years ago
- Status changed from Needs Feedback to Closed
No feedback since the last 90 days => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards
Updated by dermueller no-lastname-given over 4 years ago
@Riccardo De Contardi:
I can confirm that the configuration you provide above (#2) works even in TYPO3 8.7.27. So the solution is to install the "language" CKEditor plugin. Which I also had problems with - see Bug #88302. I think this ticket can be marked as solved.
Updated by Eric Harrer almost 2 years ago
- Related to Bug #97499: Wrong notation for value of allowedAttribs in Processing.yaml added
Updated by Eric Harrer almost 2 years ago
- Related to deleted (Bug #97499: Wrong notation for value of allowedAttribs in Processing.yaml)