WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] link attribute "hreflang" and quicktags.js (1 post)

  1. Kowalsky
    Member
    Posted 9 years ago #

    Hello,

    new to wordpress I enjoy using the quicktag tools to create new notes, and I would like to add some features in it, however I'm not a java script specialist.

    could someone explain me what change should I do in the "quicktags.js" file in order to have the attribute "hreflang" wich will be requested for every new link I want to include in my notes?
    ("enter the URL" then "enter the language")

    I guess it will be the same kind of change to add the "class" attribute in the image tag.
    ("enter the URL of the image"... "enter the description..." "enter the class of the image")


    function edInsertLink(myField, i, defaultValue) {
    if (!defaultValue) {
    defaultValue = 'http://';
    }
    if (!edCheckOpenTags(i)) {
    var URL = prompt('Enter the URL' ,defaultValue);
    if (URL) {
    edButtons[i].tagStart = '<a href="' + URL + '">';
    edInsertTag(myField, i);
    }
    }
    else {
    edInsertTag(myField, i);
    }
    }

    function edInsertImage(myField) {
    var myValue = prompt('Enter the URL of the image', 'http://');
    if (myValue) {
    myValue = '<img src="'
    + myValue
    + '" alt="' + prompt('Enter a description of the image', '')
    + '" />';
    edInsertContent(myField, myValue);
    }
    }

    thanks for your answers.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.