Custom HTML Formatting button (4 posts)

  1. hoboken411
    Posted 9 years ago #

    Hello all,

    Looking to create a few custom formatting buttons in HTML mode (not WYSIWYG mode). You know how we have buttons for Bold, Italic, Link, Del, etc, right?

    Is there a way for me to add a few more that I use frequently? For instance, I add a lot of target="", and class="" to my code, plus adding things like header h1, h2, h3, etc.

    I tried finding one, but to no avail. Is this do-able?

    Please advise!

  2. SouthBeach030
    Posted 9 years ago #

    Agreed. Anyone have any idea to create these? It would save a lot of time for me as well.

    How hard could it be? What file would I have to edit?

  3. Chris_K
    Posted 9 years ago #

    It's not all that difficult.

    Check out wp-includes/js/quicktags.js
    You'll see how all the current buttons are done, just follow the same format to add your own.

    Note of caution: Back this file up before upgrades or you'll lose your changes.

    I seem to recall seeing a plugin that would do this, but darned if I can remember the name. Might be worth a web search though.

Topic Closed

This topic has been closed to new replies.

About this Topic