Closed gismomtl closed 8 months ago
This is most likely expected. If you want it to show in multiple lines, change your textarea to use a wysiwyg editor.
With wysiwyg option enabled, it doesn't solve the issue. ( https://jsfiddle.net/4vahzLxc/ has been updated with wysiwyg option enabled
Hi @travist . The defect is still reproducible (I checked 4.12.x. and 5.0.0-m.10).
It is not reproducible when we view a submission in the form builder, because the following css rule applies:
div[read-only="true"] .formio-component-textarea div[ref="input"] { white-space: pre-wrap; }
. However, this will not apply when the text area is rendered in a modal.
When rendered in our app, the wrapping div does not exist.
I created a jss fiddle to simulate the issue and the fix for both modal and normal rendering: https://jsfiddle.net/darkdante/zxo8ykma/25/
Another solution would be to render <br/>
for endlines in read only mode (I see this more safe)
Can the css be included in one of the upcoming releases ? I created a pull request for this: https://github.com/formio/formio.js/pull/3494
Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!
Environment
Please provide as many details as you can:
inside a TextArea component, the calculated value is a concatenation of multiple field value separated by an end of line (\n) with a not-disabled component, text is displayed correctly with return carriage. However when component is disabled, it's not working.. everything is put in the same line
cf https://jsfiddle.net/4vahzLxc/