Project

General

Profile

Actions

Bug #102053

open

Epic #99669: CKEditor5 Collection

ckeditor - fixAttrib.class.default of A-link not applied when link is inside a list element

Added by RVVN no-lastname-given about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-09-27
Due date:
% Done:

0%

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

Description

Hi,

this is a follow up to this old closed issue : #92756

When I set this in YAML, the class is not applied to the <a> tag inside an <li> one :

processing:
  HTMLparser_db:
    tags:
      a:
        fixAttrib:
          class:
            default: external-link

I've simply fixed this by adding "ul" to the switch/case test of block elements in TYPO3\CMS\Core\Html\RteHtmlParser::TS_transform_db

I don't know if it's the right way, please find the attached patch to review.


Files

rvvn-issue-102053-fix.patch (432 Bytes) rvvn-issue-102053-fix.patch RVVN no-lastname-given, 2023-09-27 18:39

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #92756: RTE - fixAttrib to A-link not applied when link is inside listClosed2020-11-03

Actions
Actions #1

Updated by RVVN no-lastname-given about 1 year ago

  • Subject changed from ckeditor - fixAttrib.class.default of A-link not applied when link is inside list to ckeditor - fixAttrib.class.default of A-link not applied when link is inside a list element
Actions #2

Updated by Georg Ringer about 1 year ago

  • Related to Bug #92756: RTE - fixAttrib to A-link not applied when link is inside list added
Actions #3

Updated by Georg Ringer about 1 year ago

tested this in master (V13) and if added ul/ol there, after saving the whole UL is gone?!

Actions #4

Updated by RVVN no-lastname-given about 1 year ago

I set the TYPO3 version in the issue metadata so I didn't mention it but I only test this fix on TYPO3v11.5.31.
Just tested it now again, with <ol> tag too (I forgot to add this tag in the patch), and the whole HTML is preserved.

I don't have access to a TYPO3v12+ version atm.
Does the fixAttrib.class.default of A-link when link is inside a list element work on master ?
If yes, it could be a lead to a better fix covering all versions.

Actions #5

Updated by Benjamin Franzke about 1 year ago

  • Parent task set to #99669
Actions

Also available in: Atom PDF