You are not logged in.
Pages: 1
I've been using:
editor.insertNodeAtSelection(....);
to insert a new element in the document from a plugin I'm working on, in Firefox it inserts it at the position as expected, but in IE it inserts it at the start of the document.....any suggestions what might be causing this, or how to fix it?
I did try using:
var sel = editor.getSelection();
var range = editor.createRange(sel);
range.pasteHTML(...);
but that didn't insert it into the document, instead it inserted it at the top of the page
thanks
Last edited by jedi58 (2007-02-28 09:31:29)
David G. Paul
[url]http://www.newearthonline.co.uk[/url]
Offline
You would have to do
editor.focusEditor();
var sel = editor.getSelection();
var range = editor.createRange(sel);
range.pasteHTML(...);
but actually that's just what's done at the moment (see modules/InternetExplorer/InternetExplorer.js l. 315/l. 157).
Note that until recently insertNodeAtSelection() wasn't supported in IE at all, and I just implemented this free-handedly, assuming this should work.
If you gain any insights, please tell
Offline
Pages: 1