Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
getSelection() returns a string instead of Selection object
I am trying to create a DOM Range object based off a user's selection.
In Mozilla I can easily do this using: window.getSelection().getRangeAt(0)
In IE I can do document.selection.createRange();
However, in Konqueror(3.2.2) document.getSelection() returns a string instead of a Selection object and window.getSelection() doesn't work at all.
I know that the KHTML function KHTMLPart::selection() returns a DOM::Range object
(http://developer.kde.org/documentation/library/2.0-api/classref/khtml/KHTMLPart.html#selection)
The question is, is this function somehow exposed through JavaScript?
If not, does anyone know of a workaround for the problem?
Thanks in advance to anyone who can point me in the right direction.
Nick
Tough question, I guess only the developers on kfm-deel know the DOM bindings in enough detail to answer this.
http://mail.kde.org/mailman/listinfo/kfm-devel
Cheers,
_
Qt/KDE Developer
Debian User
qtforum
We got a partner for development:
www.qtforum.org
There is a KDE Development Forum and you will find there help!
thank you!
Thank you for your replies! I have posted in the above forums.
Dirk Müller has replied on kfm-devel
http://lists.kde.org/?l=kfm-devel&m=108759065530415&w=2
Cheers,
_
Qt/KDE Developer
Debian User