322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
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!

3364 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred more than 2000 users
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+4 more
sevenspark Volunteer 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/

322 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • United Kingdom
PaulWinslow says

Ah okay, that makes sense.

Appreciate it, mate :)

3364 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred more than 2000 users
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+4 more
sevenspark Volunteer moderator says

Sure thing :)

by
by
by
by
by
by