WordPress.org

Ready to get started?Download WordPress

Forums

Remove buttons from TinyMCE WYSIWYG Editor (3 posts)

  1. chloraldo
    Member
    Posted 5 years ago #

    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

  2. nealb13
    Member
    Posted 5 years ago #

    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.

  3. nealb13
    Member
    Posted 5 years ago #

    I found the answer. This works GREAT!

    http://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: http://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: http://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();
    }
    
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic