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 over 1 year ago. Updated 8 months 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

Also available in: Atom PDF