How do I:
Get the character before/after the position of the cursor in the editor? For example, “abcd|efg” where ‘|’ is cursor. How do get ‘d’ (before the cursor) or ‘e’ (after the cursor).
Get the character right before/after the selection. For example, “ab(cde)fg” where “cde” is the current selection. How to returns the character ‘(’ right before and ‘)’ right after it.
Maybe this can be done by the following?
- How to get the whole text in the editor?
- How to get the cursor position.
- How to get the selection position and its length?