Jump to content

[SOLVED] textarea wrapping problem


thewooleymammoth

Recommended Posts

I am creating an online page editor and i have the code output to a <textarea></textarea> i also have another div with a certain amount of line numbers, the problem is when you type a long string textarea drops down text to take up its own line, heres an example as if what was in the code tags were instead the <textarea>:

something something 
longstringlongstringlongstringlongstringlongstringlongstringlongstringlongstring...

 

i need it to stay on the same line ex:

 

something something longstringlongstringlongstringlongstringlongstringlongstringlongstring...

 

and i cant figure out a way to have it do that, through html css or js, any ideas appreciated

Link to comment
https://forums.phpfreaks.com/topic/151009-solved-textarea-wrapping-problem/
Share on other sites

i should explain a little more i suppose, the line numbers line up vertically like they would in common code iditors, the problem is that when <textarea> drops the line down, php does not read that as an extra line and it throws off the line numbers, so when php tells you you have an error on this line and you go to look for it, it will be a number of lines down.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.