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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.