Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-04-13 10:53:00

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

scroll to...

do you think there's a way so that if I had the reference to a particular part of the the DOM tree inside the document, or the id of an element inside the document that Xinha could be manipulated so it scrolls to where it is?


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#2 2007-04-16 10:21:43

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: scroll to...

you have access to the document object inside the iframe through the Xinha object property

var doc = xinha_editors.myTextArea._doc; // get a grip on the document
var element = doc.getElementsByTagName('p')[5]; //get some element
xinha_editors.myTextArea.scrollToElement(element); // use one of the many built-in secret magic functions :)

Offline

#3 2007-04-18 02:28:30

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: scroll to...

ah, brilliant, thanks ray!


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

Board footer

Powered by FluxBB