Support

Account

Home Forums General Issues Disable wysiwyg text-tab

Solving

Disable wysiwyg text-tab

  • I want to disable the text-mode and have only the visual mode.

    I’ve used this to customize my toolbar:

    add_filter('acf/fields/wysiwyg/toolbars', 'my_toolbars');
    function my_toolbars( $toolbars ) {
    	// Uncomment to view format of $toolbars
    
    	// Add a new toolbar called "Very Simple"
    	// - this toolbar has only 1 row of buttons
    	$toolbars['Very Simple' ] = array();
    	$toolbars['Very Simple' ][1] = array('bold' , 'link', 'italic', 'underline');
    
    	// Edit the "Full" toolbar and remove 'code'
    	// - delet from array code from http://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key
    	if( ($key = array_search('code' , $toolbars['Full' ][2])) !== false )
    	{
    	    unset( $toolbars['Full' ][2][$key] );
    	}
    
    	// remove the 'Basic' toolbar completely
    	unset( $toolbars['Basic' ] );
    
    	// return $toolbars - IMPORTANT!
    	return $toolbars;
    }
  • Hello,

    how can disable the Text tab for all users, but admins ?

    Thanks a lot and best regards
    Beat

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Disable wysiwyg text-tab’ is closed to new replies.