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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
The reason is I''m clicking on link and div appears. So iframe looses focus. But in firefox it doesn''t. Maybe there are any ways how to remember previous focus position? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It looks like Google Docs link inserting. On Feb 14, 8:11 pm, Rauan Maemirov <rauan1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The reason is I''m clicking on link and div appears. So iframe looses > focus. But in firefox it doesn''t. Maybe there are any ways how to > remember previous focus position?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---