How can I set a custom width parameter to an img tag generated by tinymce?
How can I set a custom width parameter to the img tag generated by tinymce?
I mean, when you enter an image into a textarea, how do I change its width to some custom value? Image managers config does not provide such a feature, so I want to change this script, just need to know where to start
solvable Here is my script which I added to tinyMCE initialization block
imagemanager_insert_template : function(fo, enc) {return '<img src=\"' + enc.xmlEncode(fo.url) + '\" width=\"$width_mini\" height=\"' + $width_mini/(fo.custom.width/fo.custom.height) + '\"/>';
},
This is a trick.
0
source to share
1 answer
Already answered but will post as an answer so others can see there is a solution to this problem
imagemanager_insert_template : function(fo, enc) {return '<img src=\"' + enc.xmlEncode(fo.url) + '\" width=\"$width_mini\" height=\"' + $width_mini/(fo.custom.width/fo.custom.height) + '\"/>';
},
0
source to share