[wp-hackers] Add a button to TinyMCE to add p.class

Jeremy Clarke jer at simianuprising.com
Mon Jan 12 03:22:39 GMT 2009


http://codex.wordpress.org/TinyMCE_Custom_Buttons

Omg would I also love someone to make this something I can add to WP
easily. Even just having a template for a  "tinymce plugin" (i.e. the
mce plugin rather than the wp plugin that would be used to inject the
mce plugin) that just does the standard wrapping of a html tag around
the selected bit of text (for p.class or whatever else people need).

In the html editor the buttonsnap thing is pretty good at making this
easy, but all the existing mce plugins are super complicated (viper's
is a good example but has way too much going on, I can't parse out the
hopefully simple parts that I actually need). There are several layers
of files with various naming conventions that you need to keep track
of and some pretty ugly looking JS (alright, I just can't read JS, but
still, it's farily involved).

Has anyone done this already that could just share the minimum stuff
needed to have a tag button running smoothly? It would be fantastic to
have a wp based API for adding simple buttonsnap-style mce buttons,
but I'll settle for just not having to write the whole plugin myself
:)

Thanks if anyone has input,

-- 
Jeremy Clarke | http://simianuprising.com
Code and Design | http://globalvoicesonline.org


More information about the wp-hackers mailing list