WordPress.org

Ready to get started?Download WordPress

Forums

How to edit Quicktags.js? (9 posts)

  1. Katrina
    Member
    Posted 9 years ago #

    I now tend to use the <blockquote></blockquote> tags in my posts, but when I run my blog thru the validator, it shows as invalid. It told me to put the <object></object> tags before it. I did, and it showed perfectly in the same way it should be.

    So how could I alter the quicktags.js file so it'll show <object><blockquote>

  2. amory
    Member
    Posted 9 years ago #

    open up quicktags.js and edit it to add the object tag in:
    edButtons[edButtons.length] =
    new edButton('ed_block'
    ,'b-quote'
    ,'<object><blockquote>'
    ,'</blockquote></object>'
    ,'q'
    );

  3. Lorelle
    Member
    Posted 9 years ago #

    Actually, what is happening probably has nothing to do with object. Make a double space before and after your blockquote code and it should work and validate fine.

    What is happening, probably, is that there is a tag getting in the way. We've had reports of this. Get rid of the object and test again with double spaces before and after (or even three spaces sometimes works), and if that doesn't work, try putting the paragraph above and below in paragraph tags like this:

    <p>Paragraph one....end.</p>
    <blockquote>say something clever</blockquote>
    <p>Paragraph two goes on and on...</p>

    And see if that validates. If either of these work, it's not the object tag you have to worry about. It's WordPress trying to read your mind...well, at least your code, and figure out what you are doing. We're trying to find a better fix for this.

  4. Katrina
    Member
    Posted 9 years ago #

    thanks, lorelle. I'll try that.

    Amory, I've already tried that. No good

    //edit: I'm not saying object is the only tag I have to put before it, there are other ones I forgot about...

  5. Jinsan
    Member
    Posted 9 years ago #

    blockquotes and more tags will validate if they are placed on their own line.

  6. Katrina
    Member
    Posted 9 years ago #

    omg thanks, Jinsan, that totally helped me out!

  7. sweet-e
    Member
    Posted 9 years ago #

    Hello, forum!

    Okay, so I figured out how to add custom tags to "quicktags.js".

    Now I want to add ATTRIBUTES to the "a" and "img" tags, too (I want to add "title" to the "a" tag and "alt" to the "img" tag) , but because they're classified as "special case" in the "quicktags.js" file, I don't quite know how to do it.

    Can someone please give me a clue? Thanks! :)

    Davetta

    Edit: I now see that the "alt" attribute is already specified in the "img" tag, so I just need to know how to insert the "title" attribute into the "a" tag. I also now understand that "special case" just means that there's no end tag.

  8. MichaelH
    Member
    Posted 9 years ago #

  9. sweet-e
    Member
    Posted 9 years ago #

    Thanks, Michael! Sorry for the delay in responding to your response. <del>I didn't get the notification that a reply had been made to my post</del> <ins>didn't realize that there was no reply function on this board. lol. </ins> :)

Topic Closed

This topic has been closed to new replies.

About this Topic