• I just installed this plugin, and it’s working great. One question: I added the “Custom CSS Classes” field, which gives me the “Styles” dropdown. I added my classes to the editor.css, and they are showing up great. However, in addition to my custom classes, there’s a handful of other classes that look like they are installed with WordPress by default (??):

    * aligncenter
    * alignleft
    * alignright
    * wp-caption
    * wp-caption-dd

    Any idea how I can get rid of those?

    Thanks,
    ~randy

Viewing 3 replies - 1 through 3 (of 3 total)
  • I haven’t figured out how to remove those yet. Unfortunately I think it would actually require the creation of a highly customized custom style plugin to do it.

    Basically the Custom CSS Classes TinyMCE plugin just uses a WordPress filter to add the editor.css file to a list of css files that are added to TinyMCE upon initialization. The cool part is that the classes are actually accessible by other buttons and TinyMCE plugins, so those classes can also show up in an editor dialog for tables, images, links, etc.

    There should be someway to build a TinyMCE plugin that will either just take the classes from that css file, or parse and remove the WordPress classes from the css list. Of course I haven’t tried it yet, but I’ll add it to my list in the documentation at factory.funroe.net.

    Thread Starter randyhoyt

    (@randyhoyt)

    I found a bit of a hack-y way to do this. I added the following code to the functions.php file in my active theme:

    function hide_wordpress_tinymce_classes() {
        echo '<style type="text/css">';
        echo '    tr#mce_1 {display: none !important;}';
        echo '    tr#mce_2 {display: none !important;}';
        echo '    tr#mce_3 {display: none !important;}';
        echo '    tr#mce_4 {display: none !important;}';
        echo '    tr#mce_5 {display: none !important;}';
        echo '    tr#mce_6 {display: none !important;}';
        echo '</style>';
    }
    add_action('admin_head', 'hide_wordpress_tinymce_classes');
    

    It appears that in WordPress 2.7.1 there are six of these default classes. Each item in the dropdown as an ID specified in the HTML, so I just added CSS to the top of the page that makes the first six options invisible.

    Thanks for the tip randyhoyt. This works perfectly with WordPress 2.8.4

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Edit] Existing Custom CSS Classes?’ is closed to new replies.