Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ckeditor.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
24 Mar 2014 at 08:50 UTC
Updated:
12 Sep 2015 at 13:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Codenator commentedhttp://youtu.be/uoeWG5wGL58
Comment #2
Codenator commentedComment #3
Codenator commentedComment #4
tim.plunkettI think this is just a bug. Nice find!
Comment #5
wim leersThanks for filing this issue and taking the time to record a screencast!
Before I work on this though, #2039163: Update CKEditor library to 4.4 must be committed, because that might affect the solution, since it comes with a big improvement in the code handling images inside CKEditor. Once that lands, I will look into this again :)
Comment #6
MarkusDBX commentedI investigated this bug today. After the update to CKEditor 4.4 was fixed.
There is still no automatic height calculation being done, it's just an empty value.
So when using only width to scale images, only the width-attribute is forwarded to source. This fixes the issue with the too heigh images.
However... when using only height, and not width to scale the images. Resulting in images getting only the height attribute in source. Nothing happens in the frontend theme, but it's correctly scaled in ckeditor. This might confuse users.
The reason to this is many themes just overrides the image height with css, like this:
img{height: auto;}So I guess the height/width auto calculation is still needed, because otherwise scaling by height will not work, since it's seem to be depending on the width attribute.
Question: Is the user supposed to be able to only enter the height attribute on images? (Since it will not work today with most themes by default, nothing will happen).
Comment #7
wim leersComment #8
MarkusDBX commentedComment #9
wim leersWe removed the width/height settings in the image dialog. Hence we indirectly solved this issue.
There still is the image resizing drag handle, which does work correctly. In 8.1 we should have #2061377: [drupalImage] Optionally apply image style to images uploaded in CKEditor 5, which will make all of these problems definitely a thing of the past.