Hello Gediminas,
as far as I know has the SAPEditor control no interface to the SAP GUI Scripting API, so it is not possible to get the text via SAP GUI Scripting. The SAPEditor has the ID sapeditor.sapeditorctrl.1. Your workaround seems to be a good way to get the text via SAP GUI Scripting API. Or otherwise the way which Holger describes.
Cheers
Stefan