Ticket #1065 (closed New Feature: wontfix)

Opened 7 years ago

Last modified 7 years ago

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:1 Changed 7 years ago by mitsemaj

PS, please email me if functionality already exists.

comment:2 Changed 7 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 7 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.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy