I’m adding shortcode buttons to the WP post editor but I’m having trouble working out how to add them in HTML mode.
I’m adding them in visual mode with this line..
if ( get_user_option(‘rich_editing’) == ‘true’ )
I’m assuming I can just replace ‘rich_editing’ with something else but I can’t guess what that is exactly.
Thanks for any help!
I believe they are two separate things. For the visual editor you’re adding TinyMCE buttons. For the HTML editor you’re adding “quick tags”.
It looks like it’s pretty simple to extend according to this post: http://scribu.net/wordpress/right-way-to-add-custom-quicktags.html
Otherwise, dissecting this plugin might help http://wordpress.org/extend/plugins/post-editor-buttons/screenshots/
Ah okay, that makes sense.
Appreciate it, mate
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.