Forums

font color during post (7 posts)

  1. maestro42
    Member
    Posted 6 years ago #

    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 ?

  2. oriecat
    Member
    Posted 6 years ago #

    I believe the quicktags come from wp-admin/quicktags.js
    I suppose you could try adding something in there and see if it works.

  3. sunshine
    Member
    Posted 6 years ago #

    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"
    http://www.asymptomatic.net/wp-hacks

  4. Kafkaesqui
    Moderator
    Posted 6 years ago #

    Instead of a long reply explaining how to do this:

    http://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.

  5. me
    Member
    Posted 6 years ago #

    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.

  6. maestro42
    Member
    Posted 6 years ago #

    awesome, thanks i will try this one out !!

  7. cosa
    Member
    Posted 6 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.