I think you need to turn the pop-up editing option back off again, and then use this code:
In Panorama 6 this would have been written this way, which will still work:
The various commands that each object understands are not yet documented in the Panorama X help, but they are the same as what they were in Panorama 6, so for now you can use the Panorama 6 documentation on this topic. However, the Text Editor will only work with these commands if the pop-up editing object is turned off (just as in Panorama 6, these commands would not work with the Data Cell object).
Note: Another way to write this code is:
Once an object is open, you can send more commands to it without having to repeat the object name each time.
The command is "InsertText", with no space. However, I don't think you actually want to use that command, especially since you actually weren't inserting anything, so the command wouldn't have done anything even if it was spelled correctly.
FYI, you can control what is selected when you double click by using the Initial Selection option.