Version 2.0
/wp-includes/js/quicktags.js
Line 371
edButtons[i].tagStart = '<a href="' + URL + '">';
Edit that to:
edButtons[i].tagStart = '<a href="' + URL + '" title="">';
That will insert the title=”” for you each time. Not ideal and it cannot be used with the wysiwyg toolbar.
Or, for a prompt (the same as for the link):
http://wordpress.org/support/topic/7756?replies=7
Note the line
edButtons[i].tagStart = '< a href=""'<br" />
should read
edButtons[i].tagStart = '< a href=""'
Mod/Podz – Any chance this can be edited in the other thread?
Thread Starter
apsey
(@apsey)
Thanks fellas/gals.
Your posts put me on the track but the link code needed some tweaking to work for me (using WP 2.0)
This code works like a charm in 2.0 when placed in the wp-includes/js/quicktags.js file (with the other edInsertLink function within commented out (disabled), of course):
function edInsertLink(myField, i, defaultValue) {
if (!defaultValue) {
defaultValue = 'http://';
}
if (!edCheckOpenTags(i)) {
var URL = prompt ('Enter the link URL' ,defaultValue);
if (URL) {
edButtons[i].tagStart = '<a href="' + URL + '" title="' + prompt('Enter a title for the link', '') + '"/>';
edInsertTag(myField, i);
}
}
else {
edInsertTag(myField, i);
}
}
Notice my added and essential forward-slash following the prompt for title.
Again, my warm thanks for the rapid response. YMMV, but this is a great improvement for the way I work.