Opened 11 years ago
Last modified 11 years ago
#11297 closed New Feature
Introduce styles applicable to widgets — at Initial Version
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.0 |
Component: | Core : Styles | Version: | 4.3 |
Keywords: | Cc: | wim.leers@… |
Description
Problem
It's not possible to apply style to widgets using styles combo. Styles are either applied around widget or inside its nested editables.
Simple solution
The simplest solution I can think of is to focus on classes only. A style with a special property denoting that it can be applied to widgets (or somehow generalised "subject"), could only set class(es). That class would be applied to the widget element (only) and then we or widgets authors should make sure that classes are preserved during downcasting.
Classes would of course make it possible to style all parts of widgets, not only widget element.
Why am I proposing only classes? Because styles and other attributes would make this much more complicated. First of all, they could not be applied on elements inside widget and e.g. img
is not a widget element in some cases, so how would that style apply a border to it? Second of all, there are cases in which it would not be easy to ensure that all inline styles and attributes are kept during downcasting. A "border" style for image2 for some people should behave differently whether image is captioned or not and that can be achieved only by classes.