• is there a quick and easy way to create a font color “button” that will appear next to all the other buttons when you are writing a post ? (near the bold, italic, link…etc) any thoughts ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I believe the quicktags come from wp-admin/quicktags.js
    I suppose you could try adding something in there and see if it works.

    There was a plugin that allowed you to do that without hacking the file. but I don’t know if it needs to be changed (or was changed already) for 1.5

    “Edit Button Template”
    https://www.asymptomatic.net/wp-hacks

    Instead of a long reply explaining how to do this:

    https://guff.szub.net/wp-content/quicktags-color.zip

    The mod to quicktags.js adds a ‘color’ button. From this, ed_color is referenced under the function edShowButton(), and the new function edInsertColor() can be found at the end.

    I used <span style="color:... for setting font color. Guess I’m more of a stickler for valid XHTML than I thought…

    EDIT: Note that this mod prompts you for the color. me’s solution below is easier if you always use the same color.

    I use
    edButtons[edButtons.length] =
    new edButton("ed_strong"
    ,"colour"
    ,"<span style="color:green">"
    ,"</span>"
    ,"colour"
    );

    in my quicktags.js and it works fine. It simply pumps out the span colour which can be changed easily or alternatively, you can make a few buttons with different colours.

    Thread Starter maestro42

    (@maestro42)

    awesome, thanks i will try this one out !!

    I just want to let you know that I’ve made a simple plugin to add a color picker button (where you can choose any color and automatically add the span tag to change your font color on your post) on your post/page toolbar.

    If interested, you can get the plugin here.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘font color during post’ is closed to new replies.