Hi there! I'm new to CKEditor. I've checked some samples on how to get the text selection and they are working great. But I also need to find out what is the position of the cursor (not X-Y coordinates on screen, but an offset of the current HTML)
What I need, is to create 2 buttons (I'll try to learn the plugins later), which shall have the following behaviour:
1- The user selects a text, and we apply some style on it (just like it is done using the buttons of CKEditor)
2- The user clicks on a styled entry, and on the second button: We can retreive it's position and remove it from the editor.
Could someone point me on the right direction here?
Regards
What I need, is to create 2 buttons (I'll try to learn the plugins later), which shall have the following behaviour:
1- The user selects a text, and we apply some style on it (just like it is done using the buttons of CKEditor)
2- The user clicks on a styled entry, and on the second button: We can retreive it's position and remove it from the editor.
Could someone point me on the right direction here?
Regards

Re: Getting selection, html and cursor position
Really all you have to do is find the commands the editor uses (See CKEDITOR API and styles plugins). I don't think you ever need the mouse position to do any of this (You could probably do a blank insertHTML command to remove the text or there's probably a clear function too)