this.pasteHTML() returning 'r.select is not a function' error in firefox


line 123 of jHTMLArea-0.7.0.js is causes an error in firefox.
commenting out this line seems to fix this issue.


aslh wrote Mar 16, 2011 at 4:50 PM

Since it only throws and error in firefox you might prefer to handle the error instead of leaving out the line completely. I would suggest to replace it with the following code until a solution for firefox is found:

if (typeof r.select == 'function') {

wrote Nov 27, 2012 at 2:14 PM

nverwer wrote Nov 27, 2012 at 2:16 PM

The problem is still present in jHTMLArea-0.7.5, and the firefox version of 2012-11-27 (don't know which version number, I have lost count).
The suggested fix works.

wrote Feb 22, 2013 at 12:58 AM

gmoricz wrote May 31, 2016 at 10:46 PM

in 0.8 this error appear in IE 11 too.

gmoricz wrote May 31, 2016 at 10:49 PM

Thats what I did:
            if (typeof r.select == 'function') {
                r.insertNode($(this.iframe[0].contentWindow.document.createElement("span")).append($((html.indexOf("<") != 0) ? "<span>" + html + "</span>" : html))[0]);