HTMLArea problem

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

HTMLArea problem

Post by balltongu »

Hi all,

I just found this little gem of a product last night as I was looking for something to create a customer knowledgebase with. I also noticed it had HTMLArea included with it, which I was looking forward to using. The problem is, it isn't working.

Here's what I can tell you. When I click on Create Entry, HTMLArea's interface comes up, but none of the buttons actually work. When looking at the JS Console, I see these two things:

Error: this.doc has no properties
Source File: http://localhost/phpmyfaq/admin/editor/htmlarea.js
Line: 1782

&

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/phpmyfaq/admin/editor/htmlarea.js :: initIframe :: line 742" data: no]

When I actually click on one of the buttons, this shows up in the JS Console:

Error: this._doc has no properties
Source File: http://localhost/phpmyfaq/admin/editor/htmlarea.js
Line: 1901

I'll save everyone the trouble of searching through their htmlarea.js files:

Line 1782 and area:

// retrieve the HTML
HTMLArea.prototype.getHTML = function() {
switch (this._editMode) {
case "wysiwyg" :
if (!this.config.fullPage) {
return HTMLArea.getHTML(this._doc.body, false, this);
} else
return this.doctype + "\n" + HTMLArea.getHTML(this._doc.documentElement, true, this);
case "textmode" : return this._textArea.value;
default : alert("Mode <" + mode + "> not defined!");
}
return false;
};

Line 742 and area:
}
if (HTMLArea.is_gecko) {
// enable editable mode for Mozilla
doc.designMode = "on";
}
editor._doc = doc;
if (!editor.config.fullPage) {
doc.open();
var html = "<html>\n";
html += "<head>\n";
if (editor.config.baseURL)
html += '<base href="' + editor.config.baseURL + '" />';
html += "<style>" + editor.config.pageStyle +
" html,body { border: 0px; }</style>\n";
html += "</head>\n";
html += "<body>\n";
html += editor._textArea.value;
html += "</body>\n";
html += "</html>";
doc.write(html);
doc.close();
}

1901 and surrounding area:

// returns a range for the current selection
HTMLArea.prototype._createRange = function(sel) {
if (HTMLArea.is_ie) {
return sel.createRange();
} else {
this.focusEditor();
if (typeof sel != "undefined") {
try {
return sel.getRangeAt(0);
} catch(e) {
return this._doc.createRange();
}
} else {
return this._doc.createRange();
}
}
};


I really hope someone can shed some light on this for me, as I'm really wanting to get working on the actual documentation for this.

Thanx,

Iann
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which browser do you use? I cannot reproduce your bug on Firefox 0.9.3

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

The above scenario was produced with Firefox 0.9.3 or 0.9.2 (not sure, not at that computer right now) under Mandrake 10. Using Internet Explorer 6.0 either from Windows or using Crossover Office in Mandrake 10 I just get lines in place of where the buttons should be.

Iann
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

What version off phpMyFAQ do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

It's version 1.4.1. I just noticed the update file available, so I will try that and get back to you.

Iann
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

Well.... I came to work, fired up this machine, and lo and behold, it started working. No idea what that was all about, but thanx for the help anyway.

Iann
Post Reply