I am adding an image to a TinyMCE editor using:
var params = {
src: filename,
title: "Attached image: " + filename,
width: 500
};
ed.execCommand("mceInsertContent", false, ed.dom.createHTML("img", params));
This insert the image correctly in the editor. However, when the user clicks on the image he has the ability of resizing it.
I would like to know if there is a way to:
- Prevent the user to resize only in one direction (i.e. how do I keep a fixed aspect ratio for the image)
- Completely prevent the user to resize the image
object_resizing
resize events are NOT called... Is there something I am missing? – Galvan