Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Is there a way to input multiple rows of text and save it as a variable? Like an InputField, but with multiple rows? I would like to make a simple text redactor, so that I could enter a text and then use it as a variable.

share|improve this question

marked as duplicate by Dr. belisarius, Kuba, Pinguin Dirk, Mr.Wizard Sep 23 '13 at 12:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

Simple InputField will work. You just need to use \[NewLine] when you need it. Create a pallete for this purpose or a shortkey, or event handler.

You can use a quick fix too:

           Dynamic[x, (x = StringReplace[#, "\\n" -> "\n"]) &],
           String, ContinuousAction -> True]

enter image description here

so now every time you type "\n" it will create new line.

Is this what you're after?

share|improve this answer
Ideally I would like to have smth more user-friendly since my future application will be used by people without Mathematica experience, but this will work, thx. – Wenli Sep 23 '13 at 12:24
@Wenli Take a look at my comment under your question – Dr. belisarius Sep 23 '13 at 12:27
Thx! That's a duplicate indeed. – Wenli Sep 23 '13 at 12:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.