What do you mean by ‘paste into the text field again’? That the frame becomes an inline? If what you select is on a single line, then the script below would do it. Select some text, all on one line, and run the script.
(function(){
var width = app.selection[0].endHorizontalOffset - app.selection[0].horizontalOffset;
var frame = app.selection[0].textFrames.add();
app.selection[0].move (LocationOptions.AFTER, frame.insertionPoints[0]);
var gb = frame.geometricBounds;
gb[3] = gb[1]+width
frame.geometricBounds = gb;
}());
Peter