• Hi everyone!

    Im trying to add a new button to the wordpress editor by adding this to the quicktags.js file but it just ends up making the toolbars completely disappear:

    edButtons[edButtons.length] =
    new edButton('ed_more'
    ,'Gall Code'
    ,'<div style="float: right; padding: 4px; margin: 6px; font-size: x-small; border: 1px solid #000; text-align: right;"><em>Photos: PHOTO CREDIT</em>
    [gallery slide="1" orderby="post_name"]
    <strong><div style="text-align: center;">Click the photo to go to the next photo</div></strong></div>'
    ,''
    ,'t'
    ,-1
    );

    I have no clue whats wrong since I am able to make buttons with simpler codes show up. Is this code just too advanced?

Viewing 3 replies - 1 through 3 (of 3 total)
  • This:

    ,'<div style="float: right; padding: 4px; margin: 6px; font-size: x-small; border: 1px solid #000; text-align: right;"><em>Photos: PHOTO CREDIT</em>
    [gallery slide="1" orderby="post_name"]
    <strong><div style="text-align: center;">Click the photo to go to the next photo</div></strong></div>'

    has to be in one line:

    ,'<div style="float: right; padding: 4px; margin: 6px; font-size: x-small; border: 1px solid #000; text-align: right;"><em>Photos: PHOTO CREDIT</em>[gallery slide="1" orderby="post_name"]<strong><div style="text-align: center;">Click the photo to go to the next photo</div></strong></div>'

    Also, this only works for the HTML editor, not in “Visual” mode.

    Correct – because that’s what the original poster was asking. Now try posting a new topic if you have an issue with the Visual Editor.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to add new button to WordPress Editor’ is closed to new replies.