javascript thread: Select Image...
Hi Robert,
> I've written some code which takes a selection of text and makes it into a
> link.
>
> But I'm not sure how to make a selected Image in my RTB into a link?
This should point you in the right direction...
if(document.selection.type == "Control"){
var selection=document.selection.createRange().item(document.selection);
selection.outerHTML="<a href=\"somelink\">" + selection.outerHTML +
"</a>";
}
HTH,
Chris
|





