PDA

View Full Version : xml - textarea newlines


woostar
02-22-2008, 03:34 AM
I'm trying to write a xml plugin that requires a textarea with newlines in...

E.G:

<optioncode>textarea</optioncode>
<defaultvalue>
word 1
word 2
word 3
word 4
</defaultvalue>

I've tried \r & \n - what is the correct way of writing it?

Regards,
W.>

Adrian Schneider
02-22-2008, 03:44 AM
It's HTML, so a <br />

woostar
02-22-2008, 03:52 AM
you cant use html linebreaks in textareas - it just displays <br /> within the box.

you just get:-
word one<br />word two<br />word three
all on one line.

Boofo
02-22-2008, 03:53 AM
\n would give you the line break

woostar
02-22-2008, 04:03 AM
\n would give you the line break

that's what I thought - but when I upload the XML it displays:-
word one\nword two\nword three
in the textarea

crazy :confused:

Boofo
02-22-2008, 04:38 AM
In the textarea you might not be able to use that. Have you tried just entering the words on a separate line for each one?