Local text object can be obtained from a text being edited using the Ted.GetCurrentLocalTxt function, e.g:
Dim objText = Ted.GetCurrentLocalTxt
Local text object can be obtained from a selected local frame on page using the Fred.GetCurrentLocalTxt function, e.g:
Dim objText = Fred.GetCurrentLocalTxt
See the example.