You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't reach the current caret position of the editor, no matter whether I am using Javascript or jQuery for that. Is there a way to get this property?
BTW you have made a great editor and thanks for that.
The text was updated successfully, but these errors were encountered:
Hi @selfrefactor - thanls for the kind comments. To get the current caret position for the focused element you can use the elements selection() method like so:
var focused = ContentEdit.Root.get().focused()
if (focused) {
console.log(focused.selection());
}
The selection returned will be a ContentSelect.Range instance. To determine the start/end of the selection use:
range.get() // returns an array [start, end]
If that's not working for you or I've not answered your question could you post an example of your code and I'll see if I can help further (might well be you've found a bug).
I couldn't reach the current caret position of the editor, no matter whether I am using Javascript or jQuery for that. Is there a way to get this property?
BTW you have made a great editor and thanks for that.
The text was updated successfully, but these errors were encountered: