You are not logged in.
Pages: 1
Hi!
Is there any way that I can move the cursor around from a javascript? (I mean the cursor in the editor which is in wysiwyg and/or text mode)
Also Does anyone know how to simulate the press of a key or keys (like Ctrl-C) from JS?
Thanks, and keep up the good work!
megaUser
Offline
You move the cursor using the selection and range objects. You'll ave to dig through htmlarea.js to see how to use them, unfortunatly IE and Mozilla do it differently, and it's not documented well by either of the browsers.
It's not possible to actually simulate a "CTRL-C", but you can call the copy command for the editor - see how the copy button in the toolbar works.
James Sleeman
Offline
Thanks!
The CTRL-c was for a workaround. I know how the copy command acts -thanks though
For the cursor moving - Can you give me a sample code on how to to move the cursor from a script to left by one char for example?
Thank You!
Offline
Pages: 1