Inserting in a text widgetYou can programmatically insert text into a text widget using the insert subcommand. You have to specify where you want to insert the text with an index, which can be one of several forms. You can specify the line number and character position with using the "line.char" format or the special index name end. You can also do a little math using the incices, like "end - 2 lines"You can also use marks to specify locations in the text. You can add your own marks, or use one of the special marks. The mark insert indicates the current cursor position, and the mark current indicates the current mouse pointer position. So this command will insert new text at the current cursor position:
.t insert "current" $newTextArts and Crafts of Tcl-Tk Programming - Useful Tk Widgets