1. You can achieve this by getting the values of the 'cursor' and 'cursor2' attributes of the TextEdit form field:
ON ACTION bold
LET r = ui.Interface.getRootNode()
LET nl = r.selectByPath("//TextEdit")
LET n = nl.item(i)
LET p = n.getParent()
LET cur = p.getAttribute("cursor")
LET cur2 = p.getAttribute("cursor2")
Attached is a basic application which shows this.
2. What you ask is that before inserting "parts of the text" an action should be executed. The same after inserting. And the same for deleting... But what do you mean exactly by "parts"? Should this be done for every character typed in the TextEdit? If not, how to determine when a "part" begins and when a "part" ends?
And what would this mean as network traffic between the front end and the DVM if an action is thrown before/after every insert/delete?
I can create a new feature request for this, but you need to clearly describe your needs.