Support » Plugins » Custom Buttons

  • Hi,

    I’m looking for a way to insert two custom buttons into the editor bar:

    – one to change text in a post to a preset color
    – one to insert a chunk of (editable) HTML into the post

    I’ve looked at Buttonsnap (, but am somewhat at a loss as to how I’d adjust that one. I didn’t find anything else (the text replacement plugin apparently doesn’t result in the raw input in the post itself).

    Most preferable would be if I could directly edit these functions into the current wysiwyg editor of WP, but I didn’t find any solutions for that either.

Viewing 11 replies - 1 through 11 (of 11 total)
  • I don’t know how to do that in the wysiwyg – I never use it.
    But for the “normal” editor you can just add your own buttons to the quicktags.js file.
    In earlier editions – see wp-admin/quicktags.js;
    for 2.0.x wp-includes/js/quicktags.js

    Guide for adding your tags:

    Les Bessant


    keeper of the Tiggers

    Another option for adding quicktags is the WP-AddQuickTag plugin. Works nicely for me…

    Hi again,

    I know how to adjust quicktags.

    But I need the buttons in the wysiwyg editor shipping with WP. It’s for a client unable to use bare html. That’s also why I need the buttons in the first place, of course I can handcode anything in that I want in a post. But for her I need buttons which do it for her.

    So no, quicktags aren’t what I’m looking for. It needs to display and work in the WP-TinyMCE.

    To be honest I always considered the wysiwyg more dangerous in the hand of code-illiterate users than the simple html editor 🙂
    Usually I don’t even tell them about the wysiwyg 🙂 Just provide them with the necessary 5-7 quicktags and let them fly…

    Hi moshu,


    I tried and allowed her to dabble with another WP setup with just Quicktags. She’s SO html-illiterate that she was gravely disturbed by the html tags displayed and balked at editing (“don’t find my way around this”).

    So unfortunately I have to use the wysiwyg editor. If it only was one less apt to f..k up… *sigh*

    Anyway – the site is about animal breeding, she needs to be able to insert pedigrees and that means a pre-configured table she sees and can post into (the cells). I can write her the relevant table, but I want a button for her, which inserts this html with one click.

    I’m no programmer, so hacking something together with Buttonsnap already is beyond me, not to speak of the ideal – a form which would transmit data to a post in coded form (there’s not by any chance something like this available, is it?).

    sorry for the around the block answer but

    for listing pedigrees you could install 2 plugins… the Custom Fields GUI plugin (to make a nice GUI with radio buttons for her to click on, or drop-down menus, how easy is that!), and you could code the Get Custom Fields plugin, to display a nice table of output that she selected in the GUI (which appears right under the posting dialog on Write > Post, at least it does in WP 1.5.x)


    it’s early morning and the 800 km highway drive of yesterday still in my bones (and brain)…

    I tried to wrap my soggy brains around this and arrive only at being quite a bit puzzled 😉

    As every pedigree will contain different names, colors, titles and registration numbers, and as there will be some 10,000++ individuals to choose from, I doubt these can be entered in a dropdown menu?

    What I’d actually need is a plugin which allows entering values (text) in certain fields which then will write the content into a stylewise and html-wise pre-configured table, which then gets published to a page’s main content. A little bit like a comment.

    I also somehow always had trouble with the custom fields, as they applied to all pages/post rather than only specified ones.


    I’m still hunting for a solution *sigh*

    Hey, I’m trying to use ButtonSnap as well at the moment, but can’t work out how to code my own buttons….

    I just want a button that will add a span around the selected text with the class of ‘mp3’

    selected text

    would turn into…

    <span class="mp3">selected text</span>

    Is this possible?

    I’ll second 3stripe’s motion, except I usually use “id” instead of “class”, like so:

    <span id=”srn”>Hello, world!</span>

    Is there anybody out there that can help with this?

    Ben, I’ve been struggling with this for a week – good to know someone else is stuck too 😉

    I’ve asked quite a few people about this but no answers yet.

    If I do work it out, I’d love to turn it into a “wysiywg css styles”plugin, so it’s not so hard for everybody else.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom Buttons’ is closed to new replies.