Image2: polishing and refactoring of internals
— at Version 10
Some refactoring got to be done to make Image2 flexible and "environment-friendly". Those changes are relevant for third-party developers, e.g. for D8.
- The internal form of the widget got to be styleable: instead of inline styles, we need to introduce classes. With inline styles, the look of the widget is not configurable and possibly incompatible with custom stylesheets during editor's lifetime.
- The non-captioned image should have no class.
- The class of captioned image must be configurable via
config.image2_captionedClass
and applied to <figure class="...">
.
- Class "caption" is obsolete so it will be removed.
- Alignment also must be controlled with classes.
- Classes must be configurable
- Tons of tests to be aligned to the new API.
- We should guarantee that additional attributes (e.g.
data-*
) are preserved, regardless of the internal state of the widget. Extra attributes must survive any kind of internal processing and re-emerge in editor's output (1:1).
- Quite likely it's already working because the image node in DOM is passed along with states of a widget (needs tests).
- Alternatively, attributes can be serialized in upcast, saved in widget's data and exploded while downcasting. But let's stick to (a) as an easiest "solution" first.
Change History (10)
Description: |
modified (diff)
|
Summary: |
Image2 in D8 →
Image2: polishing and refactoring of internals
|
Description: |
modified (diff)
|
Cc: |
wim.leers@… added
|
Keywords: |
Drupal added
|
Owner: |
set to Olek Nowodziński
|
Status: |
new →
review
|
Milestone: |
→ CKEditor 4.3.2
|
Milestone: |
CKEditor 4.3.2 →
CKEditor 4.3.3
|
Status: |
review →
assigned
|
Milestone: |
CKEditor 4.3.3 →
CKEditor 4.4
|
Description: |
modified (diff)
|
Following with great interest!