Jump to content

change image size default for CKEditor


benbyf
 Share

Recommended Posts

Hey, I'm pulling my hair out abit with CKeditor settings (documentation is impregnable), I'm trying to set the default width x height in the image modal to the same as the original image by default, not some random number which it seems to be currently. is this possible?

Screenshot 2016-06-23 12.08.07.png

Link to comment
Share on other sites

Got a feeling Its probably in the .Js :( is there a reason why this was done this way, and maybe this could be a setting that could be changed with the module (although i dond tknow if thats something thats been added to image processing in PW3)

Link to comment
Share on other sites

Changing the value does only change the "maximum", but not the actual used value. That's why I said you should look for the places where the property is used. There you can find the actual process of determining the size of the image.

Link to comment
Share on other sites

Christ, I've just done some serious needle in a haystack work. I found the function that fires in teh frontend in JS:

if($img.attr('data-fit')) {
	fitImageToWindow();
} else {
	$container.width($img.width()).height($img.height());
}

commenting out fitImageToWindow(); works but as the file is minified already I also commented out r() on col 1:8630 of the minifed file to get results straight away: so now the image simply doesnt resize to the size of th window (which personally I feel was an odd choice)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...