NB!
To test this feature build branches called "epic-6622" in these repos:
xp
lib-admin-ui
app-contentstudio
Image modal dialog now applies styles (via class attribute) directly to the figure element, both in the dialog and directly inside the editor (when changes are applied in the dialog).
However when content is saved, CKEditor processes editor contents and applies its own classes and inline styles to the figure and img elements. Same thing happens after changing image alignment via buttons in the editor toolbar.
Remove any inline styles that are now applied to figure or img elements. All styling should go via css classes applied to the figure element.
Fix it so that CKEditor doesn't alter classes applied to the figure element when loading editor contents. Keep in mind that styles are now user-definable and we cannot limit classes applied to figure element only by alignment classes - any class name is allowed.
Change behaviour of the alignment buttons in the toolbar so that they apply correct alignment classes to the figure element and are correctly highlighted based on already applied classes (see StyleHelper.STYLE.ALIGNMENT).
Check behaviour of ImageModalDialog.updateOriginalDialogInputValues method - I'm not sure we should set alignment/keepSize there since those classes are already applied to the figure element.
NB! To test this feature build branches called "epic-6622" in these repos:
Image modal dialog now applies styles (via
class
attribute) directly to thefigure
element, both in the dialog and directly inside the editor (when changes are applied in the dialog). However when content is saved, CKEditor processes editor contents and applies its own classes and inline styles to thefigure
andimg
elements. Same thing happens after changing image alignment via buttons in the editor toolbar.figure
orimg
elements. All styling should go via css classes applied to thefigure
element.figure
element when loading editor contents. Keep in mind that styles are now user-definable and we cannot limit classes applied to figure element only by alignment classes - any class name is allowed.figure
element and are correctly highlighted based on already applied classes (seeStyleHelper.STYLE.ALIGNMENT
).ImageModalDialog.updateOriginalDialogInputValues
method - I'm not sure we should set alignment/keepSize there since those classes are already applied to the figure element.