377 posts Simple is the new black.
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been part of the Envato Community for over 5 years
  • Made it to the Authors' Hall of Fame
+4 more
PaulWinslow
says

Hey all,

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!

3532 posts
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
+12 more
sevenspark
Moderator
says

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/

377 posts Simple is the new black.
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been part of the Envato Community for over 5 years
  • Made it to the Authors' Hall of Fame
+4 more
PaulWinslow
says

Ah okay, that makes sense.

Appreciate it, mate :)

3532 posts
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
+12 more
sevenspark
Moderator
says

Sure thing :)

by
by
by
by
by
by