5121 Posts in 1527 Topics by 1119 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1305 Views |
-
SS24, howto prevent TinyMCE from scaling/recalculating images?

3 June 2010 at 4:03am
Hey guys,
does anyone know a solution to prevent TinyMCE from scaling images? And why does TinyMCE limit the image size to 600px per default??? Thats really strange. Using the correct size the images get recalculated which is not good in any way of quality..
Any ideas?Thanks much
patte?
-
Re: SS24, howto prevent TinyMCE from scaling/recalculating images?

4 June 2010 at 8:06pm
Yeah someone here noticed this... I am going to raise a ticket...
in the meantime there is a solution....
cms/code/ThumbnailStripField.php
change...
if($width > 600) {
$height *= (600 / $width);
$width = 600;
}
if($height > 600) {
$width *= (600 / $height);
$height = 600;
}
to.... (or some other larger number)if($width > 1000) {
$height *= (1000/ $width);
$width = 1000;
}
if($height > 1000) {
$width *= (1000/ $height);
$height = 1000;
}Barry
-
Re: SS24, howto prevent TinyMCE from scaling/recalculating images?

7 June 2010 at 8:08pm
Hi Barry,
a perfect workaround ;-)
Thanks
patte -
Re: SS24, howto prevent TinyMCE from scaling/recalculating images?

14 August 2010 at 2:49am
just stumbled upon this again, had already posted a hack 2 years ago... (http://silverstripe.org/archive/show/37117?start=0#post70790)
ticket & nice solution by 'rino' to be found here:
http://open.silverstripe.org/ticket/4926 -
Re: SS24, howto prevent TinyMCE from scaling/recalculating images?

8 March 2013 at 8:42am
That ticket contains the perfect solution - allows you to set i.e. ThumbnailStripField::setEditorMaxWidth(800); in _config.php. (SS 2.x)
Such a simple and useful addition posted 3 years ago - what a shame it was never picked up for core!
| 1305 Views | ||
|
Page:
1
|
Go to Top |




