Project

General

Profile

Actions

Bug #88303

closed

lang-attribute for CKEditor not saved

Added by dermueller no-lastname-given almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-05-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

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!

Actions #2

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>
Actions #3

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

Actions #4

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.

Actions #5

Updated by Eric Harrer almost 2 years ago

  • Related to Bug #97499: Wrong notation for value of allowedAttribs in Processing.yaml added
Actions #6

Updated by Eric Harrer almost 2 years ago

  • Related to deleted (Bug #97499: Wrong notation for value of allowedAttribs in Processing.yaml)
Actions

Also available in: Atom PDF