4

How do I go about adding a simple button to tinymce on the default editor area of my new Custom Post Type?

I'd like the button, when clicked, to ask for a text value. The script should then lowercase the input and replace spaces with hyphens, and insert [glossary=value-entered] into the editor.

Thanks in advance,

2 Answers 2

7

Check out this tutorial on Pro Blog Design: http://www.problogdesign.com/wordpress/user-friendly-short-codes-with-tinymce/

1
  • That is a tutorial and a half... ! Thanks very much, looks like exactly what I need.
    – turbonerd
    Feb 8, 2012 at 23:12
2

Have you read this?

http://codex.wordpress.org/TinyMCE_Custom_Buttons

2
  • I actually hadn't. Is that up to date? Is it simply a case of writing a tinyMCE plugin then using that WP code to load it?
    – turbonerd
    Feb 8, 2012 at 22:55
  • That is up to date. It is as you say, writing a TinyMCE plugin and calling that with the WP code. That is how I've done it in the past. Feb 9, 2012 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.