CreateDialog[{TextCell["Enter your text here:"],
InputField[Dynamic[input], String, FieldSize -> {50, 12}],
DefaultButton[
DialogReturn[CreateDocument[TextCell[input, "Print"]]]]},
NotebookEventActions -> {}];
CreateDialog[{TextCell["Enter your text here:"],
InputField[Dynamic[input], String, FieldSize -> {50, 12}],
DefaultButton[
DialogReturn[CreateDocument[TextCell[input, "Print"]]]]},
NotebookEventActions -> {"ReturnKeyDown" :>
FrontEndTokenExecute["HandleShiftReturn"]}];
CreateDialog[{TextCell["Enter your text here:"],
InputField[Dynamic[input], String, FieldSize -> {50, 12}],
DefaultButton[
DialogReturn[
CreateDocument[
Graphics[{Yellow, Rectangle[{0, 0}, {300, 200}], Black,
Inset[TextCell[input, 12, LineSpacing -> {0, 16},
TextJustification -> 1], {0, 200}, {Left, Top}, {300,
Automatic}]}, PlotRange -> {{0, 300}, {0, 200}},
ImageSize -> {300, 200}]]]]},
CreateDialog[{TextCell["Enter your text here:"],
InputField[Dynamic[input], String, FieldSize -> {50, 12}],
DefaultButton[
DialogReturn[
CreateDocument[
Graphics[{Yellow, Rectangle[{0, 0}, {300, 200}], Black,
Inset[TextCell[input, 12, LineSpacing -> {0, 16},
TextJustification -> 1], {0, 200}, {Left, Top}, {300,
Automatic}]}, PlotRange -> {{0, 300}, {0, 200}},
ImageSize -> {300, 200}]]]]},
NotebookEventActions -> {"ReturnKeyDown" :>
FrontEndExecute[{NotebookWrite[InputNotebook[], "\n", After]}]}];
Thank you for publishing the solution. I thought more than two years
that it was impossible.
Alexey