r1523 - trunk/plugins

[email protected] Tue, 3 Oct 2006 13:47:05 +0200 (CEST)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Tue Oct  3 13:47:04 2006
New Revision: 1523

Modified:
   trunk/plugins/FCKBrowser.js
Log:
fix insertion of links via fckpopup

Modified: trunk/plugins/FCKBrowser.js
==============================================================================
--- trunk/plugins/FCKBrowser.js	(original)
+++ trunk/plugins/FCKBrowser.js	Tue Oct  3 13:47:04 2006
@@ -74,7 +74,10 @@
 		     
         var sel = window.getSelection();
         sel.selectEditableRange(BxeFCKBrowser.cssr);
-        //make string
+        sel.linkText(url);
+		return true;
+        //old method, maybe needed one day for inserting other stuff than links :)
+		//make string
 		var te = "" + sel;
 		te = te.replace(/</,"&lt;");
 		if (typeof target == "object") {
@@ -82,8 +85,7 @@
 		} else {
 			var xml = "<a xmlns='"+ XHTMLNS + "' href='"+url+"' target='"+target+"'>"+te+"</a>";
 		}
-        
-        return bxe_insertContent(xml, BXE_SELECTION);
+        //return bxe_insertContent(xml, BXE_SELECTION);
     }
     
 }
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs