1

I want the Show blocks feature of the TinyMCE Visual Blocks Plugin to be activated for all users.

I can activate the Show blocks feature under the View menu dropdown manually. See picture. This activates it for the current user.

How can I activate the feature for all users? Can it be done via the tiny mce before init hook similar to setting visualblocks_default_state ?

enter image description here

https://www.tiny.cloud/docs/plugins/visualblocks/ https://codex.wordpress.org/Plugin_API/Filter_Reference/tiny_mce_before_init

1

Just add this code to functions.php of your theme and then "View" --> "Show blocks" will always be enabled immediately when the page loads

if( !function_exists('custom_settings_tinymce') ){
  function custom_settings_tinymce($init) {

    $init['visualblocks_default_state'] = true;

    return $init;
  }
  add_filter('tiny_mce_before_init', 'custom_settings_tinymce' );
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.