Change WordPress user roles and capabilities Forums How to or FAQ How to disable the Text Editor? – just Visuell Editor should be displayed Reply To: How to disable the Text Editor? – just Visuell Editor should be displayed

#2712
kstockl
Participant

I tried this meanwhile but with one difference:

<?php
function my_editor_settings($settings) {
  if (!current_user_can('administrator')) {
    $settings['quicktags'] = false;
  }
  
  return $settings;
}

add_filter('wp_editor_settings', 'my_editor_settings');
add_filter('wp_default_editor', create_function('', 'return "tinymce";'));
?>

Here I got the 500 Error Message

So I thought just to put this code snippet without the <?php ?>.

My mistake was at the last line. Here I added ?>

Thank you so much for your time and your support. Now with your advice the Editor is doing the job as I want.

With best Regards from Austria,
Karl