WordPress.org

Ready to get started?Download WordPress

Forums

TinyMCE Advanced
disable default styles like 'wp-caption' or 'alignleft' in styles drop-down (6 posts)

  1. crysman
    Member
    Posted 11 months ago #

    Please, how do I disable that defaults? Specifically these:

    aligncenter
    alignleft
    alignright
    wp-caption
    wp-caption-dd
    wpGallery
    wp-oembed

    I want just my styles (taken from editor-style.css) being included in the styles drop-down list.

    I am looking for a way how to disable them without commenting out something in WP core or plugin source files - ideally some hook or function or something.

    Thanks

    http://wordpress.org/plugins/tinymce-advanced/

  2. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 11 months ago #

    Best way to manage the styles that appear in the drop-down menus is to specify them in the TinyMCE's settings. Perhaps use http://wordpress.org/plugins/advanced-tinymce-configuration/.

  3. crysman
    Member
    Posted 11 months ago #

    Even when I use the proposed plugin, I cannot see any "wp-caption" or "wp-oembed" there :(

    Is there some way how to disable them in tinyMCE explicitely?

    Thanks

  4. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 11 months ago #

    That plugin lets you set all TinyMCE options directly. It's not an easy task, some of them can be pretty hard to understand. Probably shouldn't recommend it any more...

    You can configure what is shown in the "Styles" drop-down by setting theme_advanced_styles to a string of comma separated name/value pairs: Name=value,Name2=value2. Note that this doesn't set any css, it only controls what is shown in the editor menu. So all css classes added there should already exist in your theme and in the theme's editor-style.css to work both on the front-end and in the editor.

    More info: http://www.tinymce.com/wiki.php/Configuration3x:theme_advanced_styles

  5. Andrew Ozz
    WordPress Dev
    Plugin Author

    Posted 11 months ago #

    On second thought: this is probably worth of a dedicated WordPress plugin with a nice UI to make it easy to set. Or maybe it should be part of TinyMCE Advanced. Have seen several questions about controlling the Styles drop-down lately.

  6. crysman
    Member
    Posted 11 months ago #

    I think you would please many users if made as a part of TinyMCE Advanced...

Reply

You must log in to post.

About this Plugin

About this Topic