Hi, All! I know how to stop default event. But does anybody know, how to set other action. E.g. I''m pressing "Enter", and event should be determined as "Ctrl+Enter". --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Simulating key events is not a trivial thing to do - they are terribly inconsistent across browsers. Besides, why would you need to determine "enter" as "ctrl-enter"? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m writing wysiwyg-editor. So in Firefox it''s work fine when i press Enter. but in IE i should enter "Ctrl+Enter", ''cause if i press "Enter" it will add <p></p>. and it looks like I pressed Enter twice. Maybe there is another solution for this? kangax wrote:> Simulating key events is not a trivial thing to do - they are terribly > inconsistent across browsers. > Besides, why would you need to determine "enter" as "ctrl-enter"?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Opps! I mean "Shift+Enter", but not "Ctrl+Enter". On Dec 9, 4:00 pm, Rauan Maemirov <rauan1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m writing wysiwyg-editor. So in Firefox it''s work fine when i press > Enter. but in IE i should enter "Ctrl+Enter", ''cause if i press > "Enter" it will add <p></p>. and it looks like I pressed Enter twice. > Maybe there is another solution for this? > > kangax wrote: > > Simulating key events is not a trivial thing to do - they are terribly > > inconsistent across browsers. > > Besides, why would you need to determine "enter" as "ctrl-enter"?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nobody knows? :( On Dec 9, 4:00 pm, Rauan Maemirov <rauan1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m writing wysiwyg-editor. So in Firefox it''s work fine when i press > Enter. but in IE i should enter "Ctrl+Enter", ''cause if i press > "Enter" it will add <p></p>. and it looks like I pressed Enter twice. > Maybe there is another solution for this? > > kangax wrote: > > Simulating key events is not a trivial thing to do - they are terribly > > inconsistent across browsers. > > Besides, why would you need to determine "enter" as "ctrl-enter"?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Could you be more specific as to what exactly you''re trying to do? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
When U pressing "Enter" in textfield (iframe with contentEditable=true) firefox inserts one "<br>"(new line). But Internet Explorer seems to insert two new lines(it inserts <p>). I think it depends on big interval between paragraphs. So, if U want to insert "<br>" in IE U should press "Shift+Enter". Of course, I can observe keypress (), but it''s too complicated to execCommand. So, I want to just redefine pressed key actions. On Dec 10, 8:47 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could you be more specific as to what exactly you''re trying to do?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Instead of creating you own WYSIWYG editor, why not just use FCKeditor<http://www.fckeditor.net/>. Its free and it has cross browser support :) On Dec 10, 2007 3:17 PM, Rauan Maemirov <rauan1987-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > When U pressing "Enter" in textfield (iframe with > contentEditable=true) firefox inserts one "<br>"(new line). But > Internet Explorer seems to insert two new lines(it inserts <p>). I > think it depends on big interval between paragraphs. So, if U want to > insert "<br>" in IE U should press "Shift+Enter". Of course, I can > observe keypress (), but it''s too complicated to execCommand. So, I > want to just redefine pressed key actions. > > On Dec 10, 8:47 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Could you be more specific as to what exactly you''re trying to do? > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sometimes it''s better to create your own editor. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So does anybody know how to do it at least on IE? Or maybe U could provide some links on howto? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---