0

For my text-format i have "drupal media insert" in my toolbar, when choosing an image to insert there are options to align the image, i.e "align left break text" it will add a data-align attribute and in the frontend add a class ".align-left"

Is there a way to add further classes to the figure element without patching the core files?

Right now I am using a behaviour for that, but that feels like a weird ducktape

e.g

$(once('setLegacyImageAlignClasses', 'figure.align-left', context)).addClass('embedded-entity content-image content-image--medium pullout pullout--left');

what would be the correct way to add further custom classes? (D10.1, ckeditor5)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.