Inserting a link changes highlighted text to Node Title text.
TimG - February 7, 2009 - 01:46
| Project: | Link to content |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When highlighting text and then choosing my node, then clicking okay to link to it, the original highlighted text will get replaced with the Title field of the node I chose.
Is it possible to keep the original text instead of having this happen? Or at least be able to turn this functionality on/off somehow? Right now I have to keep re-typing the hyperlink text every time use this.
I'm using Drupal v6.9, Link to content v 6.x-2.x-dev, and FCKeditor v 6.x-1.3-rc7.
Thanks!
-Tim

#1
I think I figured out a temporary solution. I just commented out line 92 in fckeditor > plugins > linktonode > jscripts > utils.js.
//oLink.innerHTML = sInnerHtml ;
-Tim
#2
Hello,
I was surprised to see this issue closed, as the default behaviour of replacing the user's link text is a bit of a deal-breaker for me, in an otherwise excellent module.
I modified the temporary fix slightly though, so that the node title is used if the user hasn't selected any text:
if(oLink.innerHTML == '') {oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML
}
I've changed the status of this issue back to 'active' (hope that's OK), as I'd love to see this simple change get into the module.