au...@muze.nl
unread,Apr 10, 2008, 5:20:08 AM4/10/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to helene-dev
Hi,
I'm working on a new way to show the input bar / cursor. Instead of
moving a textarea of one line around, the idea is to make the textarea
the full size of the content, but use clipping to just show the line
where the cursor is.
This means that instead of doing all the work for cursor movement in
javascript, we can just let the textarea do its thing, and on each
keyclick/mouseup read the selection position of the textarea, and clip
around that.
Selections will than just work, on all browsers.
I've made a test page for a cross browser textarea selection library,
which is also in svn (textarea.test.html).
I've tested that in IE7, FF2, Opera 9 and Safari 3 (windows).
There are some potential problems, only IE has a method to insert
content into a specific location in a textarea, for the rest you need
to change the textarea.value, simply putting in the entire - changed -
contents. This may get slow on large files, and you can see a flicker.
If you want to add a different editor personality, e.g. joe, you will
still have to do all the cursor movement stuff in javascript.
regards,
Auke