rem: var htmlSelectionControl = "Control"; var grngMaster = editor._doc.selection.createRange(); 
add: editor._doc.execCommand("createlink", false, '/root?node_id=' + file['node_id']); a = editor.getParentElement(); var sel = editor._getSelection(); var range = editor._createRange(sel); if (!HTMLArea.is_ie) { a = range.startContainer; if (!/^a$/i.test(a.tagName)) a = a.nextSibling; }  if(a) a.title = file['name'] + ' : ' + file['size']; 
context:   	function (file)    {      var htmlSelectionControl = "Control";      var grngMaster = editor._doc.selection.createRange();            // delete selected content and replace with image      if (editor._doc.selection.type == htmlSelectionControl)      {        grngMaster.execCommand('Delete');        grngMaster = editor._doc.selection.createRange();      }            	idstr = "556e697175657e537472696e67";      grngMaster.execCommand("CreateLink", null, idstr);      coll = editor._doc.getElementsByTagName("A");      for(i=0; i<coll.length; i++)      {      	if (coll[i].href == idstr)      	{    		  link_element = coll[i];      		if (link_element.firstChild == null)      		{      			txt = editor._doc.createTextNode(file.name);      			link_element.appendChild(txt);      		}    		  link_element.href = '/root?node_id=' + file.node_id;    		  link_element.title = file.name;    		}    	}          grngMaster.collapse(false);      grngMaster.select();    }, 
meta: 8196	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8196/2a95aee0924e41cc8be71e53596a918d46619318/htmlarea_extension.js/buggy/trunk/shared/js/htmlarea_extension.js