Indicate incompatible styles on CKE5

Created on 15 February 2024, 10 months ago
Updated 5 May 2024, 8 months ago

Problem/Motivation

When creating content, we have some styles that can be applied to links that shouldn't both be applied: the most obvious example 'a.arrow-left', 'a.arrow-up', and 'a.arrow-right', which place an arrow to the left, above, or right of the link. Currently, editors can choose multiples of these.

Steps to reproduce

Create two arbitrary styles in the format config, and pretend that they shouldn't both be applied to the same element. There is no way to indicate this to the format.

Proposed resolution

I tried adding `a.arrow-right:not(.arrow-left)` as the class hoping that it would work as an additional selector, but saw the error: "Line 3 does not contain a valid value. Enter a valid CSS selector containing one or more classes, followed by a pipe symbol and a label."

I think this is probably the simplest way to handle this kind of edge case, but the validator rejects it so I'm not sure if it would even work.

Feature request
Status

Active

Version

11.0 🔥

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇺🇸United States dzinkevich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024