Project

General

Profile

Actions

Bug #89770

closed

Editing a link in ckeditor removes a set CSS class

Added by Andreas Kienast almost 5 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-11-25
Due date:
% Done:

0%

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

Description

A link being set in ckeditor may have several attriutes set, for example its title, the target and a set of pre-configured CSS classes.

However, editing such link renders the CSS selection with an empty value which removes the previously set class if the link gets updated.

Actions #1

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from In Progress to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62426

Actions #2

Updated by Riccardo De Contardi almost 5 years ago

I think that these issues are related or even the same:

#83754, #84743, #88710

Actions #3

Updated by Riccardo De Contardi almost 5 years ago

I am unsure about how to reproduce this issue. May I ask a step-by-step guide? Including the CKeditor yaml configuration that should be used? Thank you!

Actions #4

Updated by Andreas Kienast almost 5 years ago

@Riccardo

I've tested this with Bootstrap Package, reproducing it's pretty simple:

  1. Edit any content element that has a ckeditor
  2. Mark some text and put a link on it. In the Link Browser, select a CSS class from the selector and finally set the link
  3. Edit the link again, the previously selected class is not selected anymore
Actions #5

Updated by Riccardo De Contardi almost 5 years ago

@Andreas Otto †

I tried with the yaml configuration taken from Bootstap package:

classesAnchor:
    page:
        class: 'link-page'
        type: 'page'
    folder:
        class: 'link-folder'
        type: 'folder'
    file:
        class: 'link-file'
        type: 'file'
    external:
        class: 'link-external'
        type: 'url'
    mail:
        class: 'link-mail'
        type: 'mail'

buttons:
    link:
        properties:
            class:
                allowedClasses: 'link-arrow, link-page, link-folder, link-file, link-external, link-mail'

And actually, the behavior is the one you described. But I think that it is due to the link-arrow class that has no "type" defined. Actually, if you remove it, then the selected class will stay.

That's the same behavior I experienced with my first attempt:

classesAnchor:
  internalLink:
    class: 'internal-link'
    type: 'page'

  internalLink2:
    class: 'internal-link-2'
    type: 'page'    

buttons:
  link:
    properties:
      class:
        allowedClasses: 'internal-link,internal-link-2'
Actions #6

Updated by Markus Klein almost 5 years ago

I agree with Riccardo here, configuration error.

Actions #7

Updated by Andreas Kienast almost 5 years ago

  • Status changed from Under Review to Rejected
Actions

Also available in: Atom PDF