Bug 95923

Summary: run fckeditor with khtml
Product: [Applications] konqueror Reporter: CS <cedric>
Component: khtml ecmaAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: finex, hwouters, kdestuff, mail, mario_vazq, sebastian_ml
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description CS 2004-12-28 14:07:07 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Mandrake RPMs
OS:                Linux

the fckeditor is not run with konqueror....
http://www.fckeditor.net/demo/default.html

the toolbar is not here...
Comment 1 Pinaraf 2004-12-28 16:37:10 UTC
To be more precise : it seems that the rich text editing component is not implemented in KHTML, while it exists in Gecko, IE and Opera.
That component is really useful on webmails for instance.
Just see the result in Mozilla or Opera.
Comment 2 Maksim Orlovich 2005-06-17 00:02:36 UTC
*** Bug 107564 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Braml 2005-07-21 15:55:01 UTC
To be even more precise: it seems to be an JS-related error, either in the
script or in the JS-implementation Konqueror uses. The error message is as 
follows:

Error: http://www.fckeditor.net/fckeditor/editor/js/fck_startup.js: TypeError - Value undefined (result of expression window.attachEvent) is not an object. Cannot be called.

Unfortunately, I'm not the JS-guru to judge which of the two alternatives
mentioned applies :(
Comment 4 Andreas Braml 2005-07-21 15:55:27 UTC
To be even more precise: it seems to be an JS-related error, either in the
script or in the JS-implementation Konqueror uses. The error message is as 
follows:

Error: http://www.fckeditor.net/fckeditor/editor/js/fck_startup.js: TypeError - Value undefined (result of expression window.attachEvent) is not an object. Cannot be called.

Unfortunately, I'm not the JS-guru to judge which of the two alternatives
mentioned applies :(
Comment 5 Maksim Orlovich 2005-07-21 16:18:28 UTC
IIRC, attachEvent is IE proprietary junk
Comment 6 Allan Sandfeld 2005-07-21 16:26:55 UTC
Any documentation of attachEvent?

Is it supported on other browsers that IE?
Comment 7 Mario A. Vazquez 2005-12-01 16:21:18 UTC
I found this sample on the web at http://www.javascriptkit.com/javatutors/ns6update.shtml

-----
Last but no least, whenever possible, you should bind event handlers to the document by doing so inside your script and using the DOM. For example, instead of:
<body onload="dothis()">
you should instead do this:
<script type="text/javascript">
if (window.addEventListener) //DOM method for binding an event
window.addEventListener("load", dothis, false)
else if (window.attachEvent) //IE exclusive method for binding an event
window.attachEvent("onload", dothis)
else if (document.getElementById) //support older modern browsers
window.onload=dothis
</script>

----

We could either contact the fckeditor author to check the code, or in someway implement the IE window.attachEvent with a redirection to the DOM window.addEventListener call.  Dunno the method used by Firefox, in fact, the control is displayed.
Comment 8 Mario A. Vazquez 2005-12-01 16:35:40 UTC
More info about the call here
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/attachevent.asp

Also after dealing with attachEvent, should also take a look to its brother detachEvent which probably is used too.
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/detachevent.asp
Comment 9 Charles de Miramon 2006-01-01 14:40:35 UTC
There is a patch for Webkit :
http://bugzilla.opendarwin.org/show_bug.cgi?id=4403

I've just tried FckEditor on my personal MoinMoin Wiki and it is very nice and something that we should support for Konqueror.
Comment 10 Maksim Orlovich 2006-10-25 17:55:46 UTC
*** Bug 136290 has been marked as a duplicate of this bug. ***
Comment 11 FiNeX 2008-06-27 16:58:11 UTC
Please, vote for bug #48302 :-)

*** This bug has been marked as a duplicate of 48302 ***
Comment 12 Maksim Orlovich 2008-06-27 18:38:01 UTC
Please don't dupe it --- it needs debugging separate from designMode/contentEditable proper.
Comment 13 Morten Sjoegren 2011-08-11 18:02:41 UTC
Still an issue with KDE4.6.5
Comment 14 Christoph Cullmann 2024-05-06 20:51:17 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann