• Thanks for this great plug in.

    Can WP Super Edit disable the HTML tab on the WYSIWYG editor for only the Contributor role? If so, how?

    Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • That is a new one!

    The easiest method I’ve seen so far from some quick research is to actually set the CSS for the .edButtonHTML in the admin css.

    it would be something like:

    .edButtonHTML {
       display: none;
    }

    It doesn’t actually remove the functionality, but it would hide it from view.

    I’m going to add it to my feature requests, but that might prove a little tricky. I do see how it would be an advantage if was configurable on a user or role basis.

    Thread Starter [)4@6()|/|

    (@dragontheory)

    Thanks for responding.

    Yea, I’m using WordPress as a CMS (honormen.org) so I don’t want to open a “Pandora’s Box” of formatting and security issues by letting contributors edit the source.

    I found the same CSS but I need to be able to edit the source as admin. That is why I was asking if it could be controled based on role. Because it is not a “plug-in”, editing the admin CSS file would be reset if/when WordPress releases an update right?

    Look forward to your next release of this very cool plug-in.

    Thread Starter [)4@6()|/|

    (@dragontheory)

    I’m also interested in disabling the html editor for certain users (basically disable it for everyone except admin.) I’m building a site for a client and want to “idiot-proof” the text editor. Thanks.

    .edButtonHTML {
    display: none;
    }

    Has anyone tested this code above to see if it works to disable the HTML editor in WP2.7? And in which css file should it be placed? I tried putting it in wp-admin/rtl.css but it doesn’t have any effect.

    Just tried this trick on the svn trunk. My fault it’s an ID not a CLASS.

    I put this at the very bottom of my wp-admin/css/colors-classic.css. So you would need to put at the end of any particular admin color theme css file. Ideally it would be better in a css file and wp_enqueue’d via a WordPress plugin. It will probably need to be LAST in the CSS scope to work.

    #editor-toolbar #edButtonHTML {
    	display: none;
    }

    I really had to do some cache flushing and reloading before it worked.

    HOW TO: REMOVE HTML MODE for WordPress User Roles
    The following change to the WordPress code will allow you to control which user roles have the ability to view the HTML mode when editing content. After the code has been changed – this exact code will only allow Admin users to use the HTML and Visual Mode. All other users will be limited to Visual Mode Only.
    ——————————–

    WordPress is a great CMS tool.
    I also wanted to add additional control over what each user is able to change within the admin. The above mentioned CSS solutions did not work for me nor did they seem like a clean solution.

    The clean and simple way to add user level control over this feature is the following:

    Find: wp-includes/general-template.php

    Find: <a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>

    It will be located around line: 1506
    Replace: `<?php if ( current_user_can(‘level_10’) ) { ?>
    ‘, ‘html’);”><?php _e(‘HTML’); ?>
    <?php } ?>`

    Similar code can be found in: wp-admin/press-this.php
    It is not a requirement to make changes in this document.

    I hope this solution helps the development community. It would be nice if someone would convert this into a plugin with additional controls.

    Visit us online: http://www.kontrive.com

    Hi kontrivemedia,

    What does the whole line of code look like, I can’t quite get it to work. Would you be able to email me what the line of code is supposed to be at [email protected]. I tried to post here what I tried doing, but it looked different after I posted it. Thanks a bunch!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: WP Super Edit] Disable the HTML tab?’ is closed to new replies.