How to write character strings directly on TextEdit

See How passing a variable from Shell to AppleScript? for an example how to use AppleScript from Xojo.