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

Comments

TimG1’s picture

Status: Active » Closed (fixed)

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

matkeane’s picture

Status: Closed (fixed) » Active

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.