[jQuery] Re: Simulate BackSpace key

2009-01-21 Thread Rick Faircloth
Looks good RSol...now for image handling capability? :o) -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of RSol Sent: Wednesday, January 21, 2009 1:30 AM To: jQuery (English) Subject: [jQuery] Re: Simulate BackSpace key http

[jQuery] Re: Simulate BackSpace key

2009-01-20 Thread RSol
Thanks to all! I do my WYSWYG editor as jQuery plugin: http://plugins.jquery.com/project/RSEditor Please see and say what you think about it.

[jQuery] Re: Simulate BackSpace key

2009-01-20 Thread Rick Faircloth
) Subject: [jQuery] Re: Simulate BackSpace key Thanks to all! I do my WYSWYG editor as jQuery plugin: http://plugins.jquery.com/project/RSEditor Please see and say what you think about it.

[jQuery] Re: Simulate BackSpace key

2009-01-20 Thread RSol
http://inf.in-desk.ru/ On 20 янв, 17:27, Rick Faircloth r...@whitestonemedia.com wrote: I went to take a look at the demo, but all I got was a page of code...is there a working demo online?

[jQuery] Re: Simulate BackSpace key

2009-01-12 Thread RSol
Thank to all! I do it! function setCursorPosition(textArea, selOffset) { if (document.selection) { // IE, Opera var sel = document.selection.createRange(); sel.collapse(true); sel.moveStart('character', selOffset); textArea.focus(); sel.select();

[jQuery] Re: Simulate BackSpace key

2009-01-12 Thread RSol
What do movePrev() and .moveNext() function? I know'n that functions in jQuery. On 12 янв, 09:48, ggerri a...@ggerri.com wrote: Hi I've done something similar with the Tab. Maybe that helps. You'll need the FIELDS Plugin for that: $(#PG1_L02-4-5)                

[jQuery] Re: Simulate BackSpace key

2009-01-11 Thread ggerri
Hi I've done something similar with the Tab. Maybe that helps. You'll need the FIELDS Plugin for that: $(#PG1_L02-4-5) .bind('keydown',function(e) { switch(e.keyCode) { case 9: // tab

[jQuery] Re: Simulate BackSpace key

2009-01-09 Thread Ricardo Tomasi
You can't actually trigger a keypress, only it's event listeners. I think you'll have to deal with ranges: https://developer.mozilla.org/En/DOM/Range On Jan 9, 4:03 am, RSol viacheslav.rud...@gmail.com wrote: To replace ':)' to image I see 2 variants: When I detect ':)' I: 1. Emulate two

[jQuery] Re: Simulate BackSpace key

2009-01-08 Thread Eric Garside
What are you trying to achieve? That bit of looks... bad at best for achieving something. What's the goal? On Jan 8, 5:57 am, RSol viacheslav.rud...@gmail.com wrote: I read that I can simulate keypress with code: $('#editor').trigger(keypress, [],null,{which: 8,pageX:e.pageX,pageY:e.pageY});

[jQuery] Re: Simulate BackSpace key

2009-01-08 Thread RSol
I write WYSWYG editor. Need to replace ':)' to image on the fly. I use execCommand('InsertImage',false,img) in 'keyup' evens, but I need to remove ':)', otherwise execCommand put image each time I press the key. On 8 янв, 17:20, Eric Garside gars...@gmail.com wrote: What are you trying to

[jQuery] Re: Simulate BackSpace key

2009-01-08 Thread Eric Garside
Ah, I think I see the issue. Am I right in assuming that you don't want to simulate the backspace, but detect it? Also, how are you keeping track of the replacement? It seems to me that you could do yourself a big favor and make what the user enters not what you show the user, so when they