0

Right now I have a basic text area on my page. It's just one big box right now. I want to know if there's a way to create a sort of grid or table inside of this textbox. I know how the user will be using this. They will essentially write everything into the box like

item one                           item two                       item three

I want to know if there's an easy way to format this or make it so that they can easily click into say the middle of the textbox and it would put them inside of that "region"?

I could probably create 3 textareas and put them side by side, but I would like to avoid that if possible.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
rohanharrison
  • 233
  • 4
  • 10

1 Answers1

0

you would need to make multiple inputs and use css to make them appear as a single input.

textarea {border:none;resize:none;}

jsfiddle

hairmot
  • 2,975
  • 1
  • 13
  • 26
  • "I could probably create 3 textareas and put them side by side, but I would like to avoid that if possible." – Goombah Dec 30 '16 at 14:15
  • Hm I wanted to avoid this, but I guess it really is the only way. – rohanharrison Dec 30 '16 at 14:22
  • sorry i missed that line! you could use jquery to monitor the cursor position within the textarea when it is focused and 'snap' it to the nearest 'area' - this relies on you defining the areas in columns though so wouldn't be very responsive - would also be tricky to validate. See http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area for info on the technical details – hairmot Dec 30 '16 at 14:30