I'm trying to modify quicktags.js in WP1.5 to insert rel="external" into links that I create. I tried changing this line:
edButtons[i].tagStart = '<a href="' + URL + '">';
to this:
edButtons[i].tagStart = '<a href="' + URL + '" rel="external">';
but it doesn't seem to work. I've looked around the forums and not found the answer, but may have missed it. Please advise. Thanks,
--recog
JuneBleeds
Member
Posted 8 years ago #
I edited my InsertLink function to actually prompt me for a relationship, just in case I'm not linking to something external and still want to assign one to it (don't ask why, but it seemed like a good idea at the time, heh). Perhaps you might find it useful. Also note that I have another prompt at the end to enter a title for the link... Yeah, I'm too lazy to manually add this stuff...
Here's the code I'm using:
edButtons[i].tagStart = '<a href="' + URL + '" rel="' + prompt('Enter a relationship for the link', '') + '" title="' + prompt('Enter a title for the link', '') + '">';
Thanks. The ability to choose sounds great, as I don't want internal links to spawn a new window.
JuneBleeds
Member
Posted 8 years ago #
No problem, recog. Glad it worked out for ya. :)
This is great but where is the "InsertLink function" found?
i assume it's in the quicktags.js