PDA

View Full Version : DisplayField format problem



veerai2i
19 May 2011, 3:21 AM
Hi ,

i am adding displayfield and its coming nicely, but the original alignment is missing, the same thing in textarea working fine.
In displayField given value is not formatted, it takes its own format...............

part of code:

xtype: 'displayfield',
fieldLabel: 'Invoke Script', id:'viewscript',
value:document.getElementById("eventInvokeScript").value

Do i need any extra attributes for format the value which includes the page break.

thanks,
veera..

friend
19 May 2011, 6:07 AM
Instead of setting the value, try using the html config option.

veerai2i
19 May 2011, 6:26 AM
Thks frnd, for quick reply,

it works,but the result is same... no indentation and no spaces...

but in textarea it works as expected....

any idea?

thanks,
veera.

friend
19 May 2011, 8:59 AM
Keep in mind it's part of the HTML specification that multiple consecutive whitespace characters are reduced down to a single character. It's assumed that you use HTML tags/CSS to properly format content which is displayed in a browser.

Note that a TextArea does respect CR/LF characters, so you'll see line breaks.

veerai2i
19 May 2011, 9:17 PM
ya, but the value is generated dynamically, how do we use html/css to format that value... we can bold the content but how to get the lpage breaks/spaces...

thanks...

howzilla
28 Oct 2016, 11:23 AM
My textareafield shows CRLF as \n\t\t.

How do I set the html config mentioned above?