Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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,

share|improve this question
add comment

2 Answers 2

up vote 7 down vote accepted

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

share|improve this answer
    
That is a tutorial and a half... ! Thanks very much, looks like exactly what I need. –  dunc Feb 8 '12 at 23:12
add comment

Have you read this?

http://codex.wordpress.org/TinyMCE_Custom_Buttons

share|improve this answer
    
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? –  dunc Feb 8 '12 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. –  Sterling Hamilton Feb 9 '12 at 5:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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