• Lawrence from Taibros.net was helping me setup a quicktag for a dropshadow effect but now that i’ve implemented it, I loose ALL of my quicktag links when I’m on the edit page. Let me show you first what i have in my css:
    .img-shadow {
    clear: both;
    float:left;
    background: url(wp-content/shadowAlpha.png) no-repeat bottom right
    !important;
    background: url(wp-content/shadow.gif) no-repeat bottom right;
    margin: 20px 0 0 17px !important;
    margin: 20px 0 0 8px;
    }
    .img-shadow img {
    display: block;
    position: relative;
    background-color: #fff;
    border: 1px solid #a9a9a9;
    margin: -6px 6px 6px -6px;
    padding: 4px;
    }
    and now my quicktags.js file. He told me to add:
    edButtons[edButtons.length] =
    new edButton(‘ed_pic_drop_shadow_left’
    ,’pic drop shadow left’
    ,'<div class=”img-shadow”>’
    ,'</div>’
    ,’p’
    );
    edButtons[edButtons.length] =
    new edButton(‘ed_pic_drop_shadow_right’
    ,’pic drop shadow right’
    ,'<div class=”img-shadow”
    style=”float:right;”>’
    ,'</div>’
    ,’p’
    );
    Again, now I have no buttons where the quicktags should be…only the quicktags link, linking back to the WP page describing them. I can delete that section from my qt.js and all is fine again, but of course, I want this to work. Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just sent you an e-mail, but i’ll post the link here anyways.
    https://weblogtoolscollection.com/archives/2004/03/24/wordpress-javascript-quicktags/

    Thread Starter idowens

    (@idowens)

    Lawtai, thanks for the quick response….If you’ll look at my page (https://www.idowens.com) you’ll see whats happening to me now…#1, I need it to be centered (can I just removed the float:right?) and also it doesn’t look to be “in” the post…it should be above the comments/etc links…any ideas?

    heh, as for the centering, i’m not sure how to solve that since i was curious myself how to do that. no one’s responded yet. if you remove float:right, it’ll default to left side, and there’s no such thing as float:center. To get the comment stuff below it, one way is to add a spacer line. add this to your css:
    div.spacer {
    clear: left;
    line-height: 0;
    height: 0;
    }
    and then when you want to make a spacer, you just type <div class=”spacer”>   </div>
    or, i just added a spacer button in the quicktags like so:
    edButtons[edButtons.length] = new edButton(‘ed_spacer’
    ,’spacer’
    ,'<div class=”spacer”>   </div>’
    ,”
    ,’p’
    );
    i think that’ll fix up the comment/link problem.

    taking a look at the css for the image shadow, the only way i can think of making it centered is by increasing the margin on the left side:
    .img-shadow {
    clear: both;
    float:left;
    background: url(wp-images/shadowAlpha.png) no-repeat bottom right !important;
    background: url(wp-images/shadow.gif) no-repeat bottom right;
    margin: 20px 0 0 17px !important;
    margin: 20px 0 0 8px;
    }
    so basically change the 17/8px margins. not the best way since it’ll always center your images and float:left/right won’t make a difference, but it should work.

    Thread Starter idowens

    (@idowens)

    Interesting….I can add the spacer but i have to add a specific number of them to get it to line up just right..(plus its a pain to have to click the button so many times trying to guess how much space needs to be there…..it does ‘work’ but its not simple…..any ideas on that end? Thank lawtai for all your suggestions!

    i need to head out, but i’ll think about it and get back to ya

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘quicktags problem’ is closed to new replies.