[wp-hackers] Editor button cusotmizations

Les Bessant les at lcb.me.uk
Wed Apr 11 22:18:16 GMT 2007

Quicktags editing:


Les Bessant les at lcb.me.uk
Losing it[1] - http://lcb.me.uk
My flickr pictures - http://flickr.com/photos/lesbessant/

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Elliotte Harold
Sent: 11 April 2007 22:54
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Editor button cusotmizations

Robin Adrianse wrote:
> Yeah, forking seems like a drastic action. There are many filters and
> actions (along with JavaScript methods) to add/remove buttons.

I'd certainly prefer not to have to fork if I can avoid it.

After tracing through several files, it looks like the relevant code is 
in quicktags.js. The relevant code looks like this:

edButtons[edButtons.length] =
new edButton('ed_ol'

It's very weird that this is all done with JavaScript. It's not clear 
why this couldn't be simple HTML.

Anyway, it's obvious in the code how to remove or add or change a 
button. I could very quickly hack this, but then I'd have to maintain my 
changes across upgrades. I'm not sure where I should be looking to do 
this in a plug-in though. Is there a specific action or filter that 
would be appropriate?

Please remember I am talking about the regular editor, *not* the rich 
editor. There seem to be more hooks for this in the rich editor.

Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
wp-hackers mailing list
wp-hackers at lists.automattic.com

More information about the wp-hackers mailing list