Opened 17 years ago

Closed 17 years ago

#1065 closed New Feature (wontfix)

capture cursor position

Reported by: Tim 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 (3)

comment:1 Changed 17 years ago by Tim

PS, please email me if functionality already exists.

comment:2 Changed 17 years ago by Martin Kou

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 17 years ago by Frederico Caldeira Knabben

Component: UI : Enter KeyGeneral
Keywords: Cursor Position removed
Milestone: FCKeditor 2.5
Resolution: wontfix
Status: newclosed

You must definitely use standard DOM features over the FCK.EditorDocument to achieve something similar.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy