• I am looking fo a way to remove buttons from the editor. For example I want to prevent editors from changing the font color…

    Is that possible?

    I could most probably do it with CSS but it would be ideal if I could remove buttons I don’t want from the menu.

    Thanks for your help

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am interested in this too.

    Is there a function that will do this?

    I don’t want to have to edit the core tinyMCE files every time WordPress does an update.

    I found the answer. This works GREAT!

    https://www.mkbergman.com/?p=275

    You just need to reformat the text when you copy and paste it into a text editor. The quotations marks are not HTML formatted.

    Here is an example of the WYSIWYG that I use.

    <?php
    /*
    Plugin Name: Advanced WYSIWYG Editor
    Plugin URI: https://www.labnotes.org/
    Description: Adds more styling options to the WYSIWYG post editor, updated for multi-line buttons.
    Version: 0.3
    Author: Assaf Arkin
    Author URI: https://labnotes.org/
    License: Creative Commons Attribution-ShareAlike
    Tags: wordpress tinymce
    */
    
    if (isset($wp_version)) {
    add_filter("mce_buttons", "extended_editor_mce_buttons", 0);
    add_filter("mce_buttons_2", "extended_editor_mce_buttons_2", 0);
    }
    
    function extended_editor_mce_buttons($buttons) {
    return array(
    "undo", "redo", "separator",
    "bold", "italic", "underline", "strikethrough", "separator",
    "bullist", "separator",
    "charmap", "separator", "link", "unlink", "anchor", "separator",
    "code", "formatselect", "separator", "separator", "search", "replace", "separator", "wphelp");
    }
    
    function extended_editor_mce_buttons_2($buttons) {
    // the second toolbar line
    return array();
    }
    
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove buttons from TinyMCE WYSIWYG Editor’ is closed to new replies.