Hi, I'm coding smth like wysiwyg-editor and stumbled upon some
obstacles.

var iDoc = $(this.wysiwyg.contentWindow.document);
var sel = (iDoc.selection) ? iDoc.selection :
this.wysiwyg.contentWindow.getSelection();

if (Prototype.Browser.IE) {
        var rng = sel.createRange();
        rng.pasteHTML(html);
} else {
// Firefox and opera code
}

So, in this code I'm inserting html to the iframe (with
contentEditable/designMode = true/on ).

Where this.wysiwyg = $('iframe'). //dynamically created iframe

In IE it doesn't insert html to iframe, but to the top of my main
document, right after the <body> tag.

What I'm doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to