LPD-42437 Sets a default width in px rather than % for images with no width #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
A while ago, we fixed the case when images with no specified width (some SVG files, for example) where not rendered inside the editor. Our way to fix this, as you can see in Patch 17, was to set
width:100%
for images.However, that's causing some issues when we try to align the image as you can read in LPD-42473.
So instead of assigning a default width based on percentage I'm doing it based on a fix width, 150px, which might sound arbitrary but I took it from this pull request, which never got committed because the sender didn't make changes requested but the idea of a fix 150px width for this kind of images seemed ok to ckeditor's developers.
Let me know if you have further questions.
Thanks.