Creating a Plugin to Replace Quicktags
-
I wanted to add a new quick tag to the html editor when i’m posting an article. I was able to easily add the button by going into “wp-includes/js/quicktags.js” and adding
edButtons[edButtons.length] = new edButton('ed_audio' ,'audio' ,'' ,'</a>' ,'z' ); // special case
This adds a new button called “audio” and with some other javascript code, it does everything I want.
My question is, does anyone know how I could create a plugin to do this. I think it is generally a bad idea to edit the core wordpress files for a bunch of reasons (including that I will have to modify the quicktags.js file every time a new version of wordpress comes out) so i was hoping that I could get the same result with a plugin.
Is this possible?
- The topic ‘Creating a Plugin to Replace Quicktags’ is closed to new replies.