Project

General

Profile

Actions

Bug #99673

closed

Epic #99669: CKEditor5 Collection

CKEditor5 Style Plugin

Added by Benjamin Kott over 1 year ago. Updated 7 months ago.

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

100%

Estimated time:
(Total: 0.00 h)
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Style definition, this should add btn and a btn-primary to a link.

{
    name: 'a',
    classes: [ 'btn', 'btn-primary' ]
},

The following examples show the result of selecting the style and | represents the current cursor positon:

Text <a href="#">Example Text</a> Text
<a class="btn btn-primary"></a>Text <a href="#">Example Text</a> Text
Text <a href="#">Example| Text</a> Text
Text <a href="#">Example</a><a class="btn btn-primary"></a><a href="#"> Text</a> Text
Text |<a href="#">Example Text</a>| Text
Text |<a href="#" class="btn btn-primary">Example Text</a>| Text
Text <a href="#">Exam|ple| Text</a> Text
Text <a href="#">Exam</a><a class="btn btn-primary" href="#">ple</a><a href="#"> Text</a> Text
Text <a href="#">Example |Text|</a> Text
Text <a href="#">Example </a><a class="btn btn-primary" href="#">Text</a> Text
Text <a href="#">Example |Text</a> Text|
Text <a href="#">Example </a><a class="btn btn-primary" href="#">Text</a><a class="btn btn-primary"> Text</a>

As a user I expect that when the text selection is inside the link, that the class will be added to the existing element.
As a user I expect that when no text selection exists, only styles are available that can be inserted standalone.
As a user I expect to only see available styles for a selection

This seems not to be possible with CKEditor5 Styles plugin.

Possible Solution:
Write custom plugin for styles and replace existing styles plugin

https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-style


Subtasks 3 (0 open3 closed)

Bug #99477: ckeditor5 html tag limitation on custom stylesClosed2023-01-06

Actions
Bug #101427: Errors in content creation in connection with styled linksResolved2023-07-24

Actions
Bug #101429: Changing the stylesheet class are confusingly and incorrectlyResolved2023-07-24

Actions
Actions

Also available in: Atom PDF