Actions
Bug #99673
closedEpic #99669: CKEditor5 Collection
CKEditor5 Style Plugin
Status:
Closed
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
Actions