Posted 19 August 2022, 2:39 am EST
Hi team,
i want to get position of cusor in the cell in GC.Spread.Sheets.CellTypes.Text.prototype.isReservedKey. How can I do that?
Forums Home / Spread / SpreadJS
Posted by: honhatan58 on 19 August 2022, 2:39 am EST
Posted 19 August 2022, 2:39 am EST
Hi team,
i want to get position of cusor in the cell in GC.Spread.Sheets.CellTypes.Text.prototype.isReservedKey. How can I do that?
Posted 22 August 2022, 7:33 am EST
HI,
You may use Selection for this. Please refer to the following code snippet and let me know if you face any issues.
//it provide offset and startContainer and end Container for the selection
window.getSelection().getRangeAt(0);
selection API: https://developer.mozilla.org/en-US/docs/Web/API/Selection
Regards,
Avinash
Posted 23 August 2022, 12:46 am EST
Hi Avinash
I used it ago, But the first time when i focus(double click) to cell. it get the position of caret wrong.