WordPress.org

Ready to get started?Download WordPress

Forums

is it possible to create a new style format? (4 posts)

  1. frank1
    Member
    Posted 9 years ago #

    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

  2. gb_
    Member
    Posted 9 years ago #

    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="http://" 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.

  3. Kafkaesqui

    Posted 9 years ago #

  4. frank1
    Member
    Posted 9 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.