Closed (works as designed)
Project:
CKEditor Image2 - Enhanced Image plugin with HTML5 caption support
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2018 at 22:19 UTC
Updated:
5 Aug 2019 at 22:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bwaindwainHere's a patch which listens to the image2 dialog's src field change event and limits the dimensions.
It expects two config variables. Set these in CKEditor profile > Advanced options > Custom JavaScript configuration
It replaces the original image2 change event function but calls it anyway. I couldn't figure out how to chain the events so I used a setTimeout().
Comment #3
bwaindwainhere's a better patch that doesn't use a timeout
Comment #4
jwilson3If you're using the responsive css provided with this module, you don't need to set an initial size because the size is scaled automatically to the width of the embedded ckeditor field on the backend, and to the width of the body field in the content column on the front-end.
Furthermore, the Drupal 8 version of this feature doesn't do anything like this either. So I dont think it makes sense to introduce a new feature that doesn't have parity with Drupal 8 at this point.
It looks like you've achieved what you need with this patch, and thanks for providing it to the community but I'm not convinced this is something that this module should be responsible for doing.
Comment #5
jwilson3