Tiny MCE image alignment and manual resizing
Question
I’m searching a solution to remove the differents possibilities of alignment of images in TinyMCE editor in WordPress and remove the manual resizing by mouse.
I already done the last one with this in css, but it could exist a better way :
/* Remove sizing on image */
div#mceResizeHandlenw,
div#mceResizeHandlene,
div#mceResizeHandlese,
div#mceResizeHandlesw {
display: none;
}
And when we are editing the images :
I tried with this without succes :
function remove_wpeditimage($plugins){
print_r($plugins);
if(($key = array_search('wpeditimage', $plugins)) !== false) {
unset($plugins[$key]);
}
print_r($plugins);
if(($key = array_search('teeny_mce_plugins', $plugins)) !== false) {
unset($plugins[$key]);
}
return $plugins;
}
add_filter( 'tiny_mce_plugins', 'remove_wpeditimage', 20, 2 );
Thank’s for your help.
Regards.
0
images, media, plugin-tinymce, plugins, tinymce
3 years
2020-07-06T03:10:22-05:00
2020-07-06T03:10:22-05:00 0 Answers
64 views
0
Leave an answer