• I am not sure how much work this would take for a plugin, but here is my plea for someone with php knowledge:
    We have buttons for strong and em but no tag for underlining, which is probably used pretty frequently alongside bold and italics.
    It would be easy if it just entailed typing <u>, but it was deprecated in xhtml 1.0 (and possibly html 4.0 strict?).
    So in sum, it would be great if someone could whip up a little plug in that adds an underline quicktag to the new post page, that creates the following code:
    <span style=”text-decoration:underline”> yaddayadda </span>

Viewing 12 replies - 1 through 12 (of 12 total)
  • I don’t think it would take much effort to implement, but I think the main reason it has been omitted to begin with is that it’s pretty bad usability to underline something that is not a link.
    Generally, if you are trying to make things standout, you bold them.

    Thread Starter solvingnormal

    (@solvingnormal)

    I guess I’m used to underlining book titles. I suppose I can use italics, it’s just not what I’m used to.

    And there’s no PHP involved in adding your own quicktag. Ok, a little javascript knowledge helps, but it’s pretty easy:
    http://www.tamba2.org.uk/wordpress/quicktags/

    I wouldn’t recommend using <u>, though. It’s a deprecated tag, and XHTML 1.0 Strict doesn’t support it.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What tags would you suggest instead?

    Thread Starter solvingnormal

    (@solvingnormal)

    Kafkaesqui – A perfect solution! Thanks much. For any others who may wish, you can copy and paste the code below:
    edButtons[edButtons.length] =
    new edButton('ed_u'
    ,'u'
    ,'<span style="text-decoration:underline">'
    ,'</span>'
    ,'u'
    );

    Thread Starter solvingnormal

    (@solvingnormal)

    macmanx – when the <u> tag was deprecated, the W3C suggested replacing it using the style attributes. The answer I suggested, using span with a style attribute (either coded the way I did, or with a class where you've defined the class as having the text-decoration:underline), seems to be what I've seen recommended.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Thanks Kaf. I still feel like <u> is a lot easier ….. I hate XHTML Strict. 🙁

    Easier is not always better, but on XHTML Strict…agreed!

    Kafkaesqui – A perfect solution! Thanks much. For any others who may wish, you can copy and paste the code below:
    edButtons[edButtons.length] =
    new edButton(‘ed_u’
    ,’u’
    ,'<span style=”text-decoration:underline”>’
    ,'</span>’
    ,’u’
    );

    Where does one post this code? Which file? Thanks!

    @daisyhead

    Look in wp-admin/quicktags.js

    If you don’t want to fiddle around with quicktags.js or any of that junk, you can add:

    .underline
    {
    text-decoration: underline;
    }

    to your CSS stylesheet (e.g. style.css) and then use:

    <span class="underline">your text here</span> inside of your posts and pages.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Plugin Request: Underline quicktag in editor’ is closed to new replies.