Support » Plugin: TinyMCE Advanced » Disable object resizing?

  • catmaniax

    (@catmaniax)


    Hello!

    I’d like to ask if there is any way to disable object resizing only in the frontend?

    I tried the code below but it seems to disable the object resizing in the backend as well. It also happens even if I don’t use TinyMCE as the text editor in the backend, weird huh?

    
    add_filter('tiny_mce_before_init', function($init) {
    	$init['object_resizing'] = false;
    	return $init;
    });
    

    Can you please let me know if there is anything I can do for this?
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrew Ozz

    (@azaozz)

    WordPress Dev

    You can still use that code but make it conditional on the “place” 🙂

    This may work:

    add_filter('tiny_mce_before_init', function($init) {
    	if ( ! is_admin() ) {
    		$init['object_resizing'] = false;
    	}
    	return $init;
    });
    • This reply was modified 4 months, 3 weeks ago by  Andrew Ozz.

    Thanks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.