Ticket #1065 (closed New Feature: wontfix)
capture cursor position
| Reported by: | mitsemaj | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | |
| Keywords: | Cc: |
Description
I would like to be able to capture the cursor position with the .Net control on a postback. with this value i could then insert a TAG or something simliar from say a list control on the same page. so the cursor position would be a numeric value in the .Value property of the editor.
Is this easy to do. I have had a bit of a look at the control but cannot see anything that will give this value.
Change History
comment:2 Changed 6 years ago by martinkou
I believe you can use the "OnMouseMove" hook in the FCK.Events object in the SVN version for that.
You can track the mouse position relative to the editing area like this:
var lastX = null ;
var lastY = null ;
var trackFunc = function( editorInstance, evt )
{
lastX = evt.clientX ;
lastY = evt.clientY ;
}
var FCKeditor_OnComplete = function()
{
FCKeditorAPI.GetInstance('MyEditorName').Events.AttachEvent(
'OnMouseMove', trackFunc ) ;
}
If you want to do it on 2.4, you can attach a DOM event handler with similar logic to the "mousemove"/"onmousemove" event of FCK.EditorDocument.
comment:3 Changed 6 years ago by fredck
- Keywords Cursor Position removed
- Resolution set to wontfix
- Status changed from new to closed
- Component changed from UI : Enter Key to General
- Milestone FCKeditor 2.5 deleted
You must definitely use standard DOM features over the FCK.EditorDocument to achieve something similar.

PS, please email me if functionality already exists.