Project

General

Profile

Actions

Bug #99477

closed

Epic #99669: CKEditor5 Collection

Bug #99673: CKEditor5 Style Plugin

ckeditor5 html tag limitation on custom styles

Added by Michael Kasten almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2023-01-06
Due date:
% Done:

0%

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

Description

We are using custom styles for the ckeditor, usually these can be limited to certain html elements:

https://ckeditor.com/docs/ckeditor5/latest/features/style.html

So in the style selector there should be only valid styles cklickable.

I have overhouled our used ckeditor configuration like:

style:
      definitions:
        - { name: "Internal Link", element: "a", classes: ['internal-link'] }
        - { name: "External Link", element: "a", classes: ['external-link'] }

but this doesnt work, i can use every style on every element, and this produce another Problem:

If i use a link style like "internal-link" on a non A Tag (maybe a word inside a P tag, for Example: "Link").

  • Selecting the Word: Link
  • Setting the style: internal-link

This is the result:


<a class="internal-link">Link</a>

And this will break the Frontend (maybe another issue, i guess this should be fixed also if empty or broken A tags are rendered)

PHP Runtime Deprecation Notice: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/typo3/cms-core/Classes/LinkHandling/TypoLinkCodecService.php line 80

Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #100908: Update ckeditor5 to 38.0Closed2023-05-23

Actions
Actions #1

Updated by Benjamin Kott almost 2 years ago

  • Parent task set to #99669

Updated by Michael Kasten over 1 year ago

for a better understanding:

two short screencaptures to compare the behaviour bettween TYPO3 v11 and TYPO3 v12

Actions #3

Updated by Michael Kasten over 1 year ago

Something new here?

Actions #4

Updated by Benjamin Franzke about 1 year ago

  • Parent task changed from #99669 to #99673
Actions #5

Updated by Benjamin Franzke about 1 year ago

  • Status changed from New to Closed

Thanks for your report, I can confirm this behaviour with v12.4.1

Something new here?

Yes, this issue has been fixed upstream in CKEditor5 v38 [1] which is included since v12.4.2 (see #100908)

https://github.com/ckeditor/ckeditor5/blob/v38.0.1/CHANGELOG.md#styles

Closing, please reopen if you still experience this issue.

Actions #6

Updated by Benjamin Franzke about 1 year ago

Actions

Also available in: Atom PDF