• I am wondering if it is pssoble to create a new style format and attach it to a quick tag. Does anyone know?

    cheers

    Frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • like, create a new button that will insert arbitrary code, like, say a link that has a specific class already attached?

    yeah. You’ll have to hack the quicktags.js file in the wp-admin directory. I did so to add a button that inserts a link with a rel=”external” (how my external links are marked for some scripting tricks). My code was just this:
    edButtons[edButtons.length] =
    new edButton('ed_xtnl'
    ,'xlink'
    ,'<a href="https://" rel="external" title="Opens in a new window">'
    ,'</a>'
    ,'x'
    );

    All that really does is throw the empty anchor tag in the box when you click the button once, and closes it on the second hit. Whee.

    Thread Starter frank1

    (@frank1)

    Many thanks guys! I’m no programmer but I will give it a try. How to bring the new button onto the quicktags menu?

    cheers

    Frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘is it possible to create a new style format?’ is closed to new replies.