Updated: Comment #212
Problem/Motivation
Inserting an image in the text editor dialog today allows the user to fiddle with image dimensions. It doesn't even have aspect ratio locking.
It's not great for the authoring experience nor for structured content reasons that users are defining the specific dimensions of every single image they insert. It'd be much better to allow them to choose from image styles — just like we do for image fields.
Proposed resolution
Allow an image style to be selected in the image dialog, which gets stored in a data-image-style
attribute, and is handled by a yet-to-be-added imagestyle
filter.
Remaining tasks
- Initial patch: select image style in dialog, inserting that sets a data- attribute, and a filter transforms the end result.
Get #1589176-4: Follow-up: Use data-* to store #states api informations— a blocker to this patch — committed.
User interface changes
- The new ability to select an image style.
- A new filter.
API changes
None.
Related Issues
- #1932652: Add image uploading to WYSIWYGs through editor.module
- #1589176-14: Follow-up: Use data-* to store #states api informations
- #2123251: Improve DX of responsive images; convert theme functions to new #type element