Parsing new "\n" as "\n\t" in a textarea
Posted: Mon Nov 22, 2004 3:51 am
Hi Guys, i am making a fairly basic forum, i wanted to have the ability to quote other messages, so i put a link on each message so that when it was clicked the message got dragged through to a textarea where the user could edit it. My problem is that i want this message to be tabbed to differentiate it from the message getting written in response.
At the moment, the text dragged through looks like so (tabs dont seem to work so i have written which lines are tabbed in):
-----------------------------------------------------------------------------------
--Begin Quote-- //this line is tabbed
alternator... and i cant do my svq. //this line is tabbed
can anyone help, //this line isnt tabbed
cheers, //this line isnt tabbed
Billy //this line isnt tabbed
--End Quote-- //this line is tabbed
Cant help im afraid! //this line isnt tabbed
------------------------------------------------------------------------------------
i would prefer it if the whole quote was tabbed in, here is my code, i am very grateful to anyone who can help.
Cheers,
Dave
At the moment, the text dragged through looks like so (tabs dont seem to work so i have written which lines are tabbed in):
-----------------------------------------------------------------------------------
--Begin Quote-- //this line is tabbed
alternator... and i cant do my svq. //this line is tabbed
can anyone help, //this line isnt tabbed
cheers, //this line isnt tabbed
Billy //this line isnt tabbed
--End Quote-- //this line is tabbed
Cant help im afraid! //this line isnt tabbed
------------------------------------------------------------------------------------
i would prefer it if the whole quote was tabbed in, here is my code, i am very grateful to anyone who can help.
Code: Select all
echo("<td><textarea name='form_content' rows='15' cols='50'>\t--Begin Quote--\n\n\t" . $content . "\n\n\t--End Quote--</textarea></td>");Dave