2005-06-07, 03:03 PM
2005-06-07, 03:05 PM
do you mean having titles for links?
like this link? ?
if so then you can use the url tag
[ url=address.com]Text [ /url]
like this link? ?
if so then you can use the url tag
[ url=address.com]Text [ /url]
2005-06-07, 03:07 PM
Yes, but I want to use any highlighted text in the post as the url. Highlight some text and hit bold to see what I mean.
2005-06-07, 03:10 PM
I don't understand you... o_O;
2005-06-07, 03:24 PM
If you have highlighted text in your reply and you hit bold, underline, color, font - any of those - it will put the tags AROUND the highlighted text.
I want it to do this:
Highlight a word in a post/reply
Hit the URL button
Prompt comes up for the URL ONLY (or the title is pre-filled in with whatever I highlighted
[ url=http://www.url.com]highlighted text would be here[/url ]
URLs without the [url] tag: ex: http://www.test.com will become hyperlinks on their own, so it's pointless to have a button that will do that.
I want it to do this:
Highlight a word in a post/reply
Hit the URL button
Prompt comes up for the URL ONLY (or the title is pre-filled in with whatever I highlighted
[ url=http://www.url.com]highlighted text would be here[/url ]
URLs without the [url] tag: ex: http://www.test.com will become hyperlinks on their own, so it's pointless to have a button that will do that.
2005-06-07, 03:41 PM
I think the solution might be in codebuttons.js
I just have no idea how to put the selected/highlighted text in a variable to use in that JavaScript.
function insertHyperlink() {
var url = prompt("Please enter the URL of the website.", "http://");
if(url) {
var urltitle = prompt("If you wish to, you may also insert a title to be shown instead of the URL.", "[color=red]SELECTED TEXT WOULD GO HERE[/color]");
if(urltitle) {
doInsert("[url="+url+"]"+urltitle+"[/url]", "", false);
} else {
doInsert("[url]"+url+"[/url]", "", false);
}
} else {
alert("Error!\n\nYou did not enter a URL for the website. Please try again.");
}
}
I just have no idea how to put the selected/highlighted text in a variable to use in that JavaScript.