htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
Patch for HTMLArea.prototype._createInternalLink function and Firefox 1.0


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


haypo
New User

Jan 11, 2005, 4:20 AM

Post #1 of 1 (2376 views)
Shortcut
Patch for HTMLArea.prototype._createInternalLink function and Firefox 1.0 Can't Post

Problem :

With Firefox 1.0 under Linux, the function insertLink doesn't work. The hack a = range.startContainer; doesn't work, a is already correct ! So I added a test to be sure that the a JavaScript variable don't already contain the link.

Patch :


Code
--- htmlarea.js.old     2005-01-11 10:15:54.000000000 +0100 
+++ htmlarea.js 2005-01-11 10:15:56.000000000 +0100
@@ -1450,7 +1450,7 @@
a = editor.getParentElement();
var sel = editor._getSelection();
var range = editor._createRange(sel);
- if (!HTMLArea.is_ie) {
+ if (!HTMLArea.is_ie && !/^a$/i.test(a.tagName)) {
a = range.startContainer;
if (!/^a$/i.test(a.tagName))
a = a.nextSibling;


Bye, Haypo

 
 
 


Search for (options)