[wp-hackers] WP Ideas: API for adding simple buttons to TinyMCE

Mike Schinkel mikeschinkel at newclarity.net
Fri Mar 19 21:51:48 UTC 2010

Literally 30 seconds before I read your email I was thinking about how I needed to add a editor button but how I was loathe to have to figure out how. So yes, very interested.


On Mar 19, 2010, at 1:01 PM, Jeremy Clarke wrote:

> Basic idea: Add a wrapper function to WP that can be called in a
> theme's functions.php (or a plugin) to add simple buttons to the
> Visual Editor. Things like <p class="translation">  or <p
> class="update"> that correspond with classes in the theme CSS. There
> are a lot of times when a button just needs to wrap a tag around a bit
> of text and it seems to me a general function that sets the before and
> after text (i.e. <p class="..."> and </p>) would be useful to almost
> every site with carefully considered CSS styles for posts.
> It's possible to add buttons like this to TinyMCE yourself manually in
> a plugin but its really, really complicated. Last time I checked it
> involved creating several files and basically becoming skilled at the
> TinyMCE API, something most theme/plugin devs would obviously rather
> avoid. For this reason I think it would make sense for WP to have a
> built-in way of adding simple buttons with only PHP. I am no good at
> javascript so I won't be the one to add it but someone out there who
> knows how to add buttons already could probably do it relatively
> easily.
> I posted about this on the Ideas Forum about a year ago:
> http://wordpress.org/extend/ideas/topic/create-easy-api-for-adding-simple-html-tag-buttons-to-tinymce
> Jane is cleaning out the ideas and will delete this one unless it gets
> some more traction so if you think its a good idea please go vote or
> leave a comment about it. I suppose if it gets enough votes in the
> next little while I'll create a Trac ticket out of it and we can deal
> with it in that format instead, otherwise we can delete it from ideas
> and let it fade into the annals of features that time forgot.
> -- 
> Jeremy Clarke | http://jeremyclarke.org
> Code and Design | http://globalvoicesonline.org
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list