AnsweredAssumed Answered

Field content with new line break

Question asked by pat9rv3sousa on Jun 28, 2017

Hi. I'm filling a field created like this:

 

<field id="my:nameAnswer" set="other1" help="something" mandatory="true">
<control template="/org/alfresco/components/form/controls/textarea.ftl">

<control-param name="saveLineBreaks">true</control-param>
</control>
</field>

I'm getting the content with: 

comment = document.getElementById("page_x002e_data-form_x002e_task-edit_x0023_default_prop_my_nameAnswer").value;

and I want to extract the text of the textarea for a file... And I'm doing this. However, if I put a line break (a new line) in the textarea on Alfresco, for example:

 

"test test

test1"

I get in the output

"test testtest1"

without line break.

 

How can I do this?

Outcomes