Announcement

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

#1 2005-05-19 10:47:52

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Insert Image after current selection / select two nodes

i have a question, perhaps somebody can help,

how can i insert an image after the current selection?

== or (would be another solution for my problem) ==
using
editor.selectNode(img)
i can select one node.

how can i select two nodes? like these:
<img src..><img src...>


Niko

Offline

#2 2005-05-19 12:00:26

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Insert Image after current selection / select two nodes

You need to work with a range object to do that.  It's different (completely) between IE and gecko, and I don't remember how sorry.


James Sleeman

Offline

#3 2005-05-19 13:29:41

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Insert Image after current selection / select two nodes

ok, thanks
i never used that, looks like i have to take a look at it now big_smile


Niko

Offline

#4 2005-05-20 09:51:23

kimss
Xinha Pro
From: Sweden
Registered: 2005-04-05
Posts: 99
Website

Re: Insert Image after current selection / select two nodes

Hmm.. There are many ways to Rome thay say, couldnt you just grab the current selection as HTML (Store it in a hidden form field) and then insert the HTML + you new image?

Offline

#5 2005-05-21 02:51:33

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Insert Image after current selection / select two nodes

yes... that would be another possibility....
i coud even store it in a JavaScript-Variable big_smile


Niko

Offline

Board footer

Powered by FluxBB