0
$\begingroup$

With InputField we can enter strings or numbers etc. I would like to input a piece of text including newlines, tabs etc. How can I do this? With standard:

InputField[Dynamic[str],String]

The Enter (newline) is not added to the string. Any other way to let a user type some text including newlines, tabs etc?

$\endgroup$
3
  • $\begingroup$ closely related: mathematica.stackexchange.com/q/6459/5478 $\endgroup$
    – Kuba
    Nov 6 '17 at 12:45
  • $\begingroup$ @Lou not too elaborated but InputField[Dynamic[str]]"and introducing "Hello\nHello\tHello" (with the " " included), returns to str a string with a newline (\n) and a tab in the second line (\t)... $\endgroup$ Nov 6 '17 at 12:50
  • $\begingroup$ .. I searched to find an answer before I posted.. Thanks @Kuba the solution is great. $\endgroup$
    – Lou
    Nov 6 '17 at 13:13

Browse other questions tagged or ask your own question.