You are not logged in.

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.

1

Friday, June 4th 2004, 12:01am

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

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Friday, June 4th 2004, 1:49pm

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

kde-forum

Unregistered

3

Friday, June 4th 2004, 2:22pm

qtforum

We got a partner for development:

www.qtforum.org

There is a KDE Development Forum and you will find there help!

4

Friday, June 4th 2004, 5:46pm

thank you!

Thank you for your replies! I have posted in the above forums.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

5

Saturday, June 19th 2004, 8:00pm

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