0
На рассмотрении
Textfield line breaks in HTML
How would I go about mimicking/converting line breaks in a multi-line textfield to HTML. I have a large textfield where a user can type an email message, but I cant translate those line breaks to HTML to send to Mandrill.
Сервис поддержки клиентов работает на платформе UserEcho
[object:TEXT.encodedtext]
The solution to this actually was to correct a small bug in how textfields returned breaks.
What you would need to do is pull in the textfield content to a texttemplate and run a replace eval to turn \n into </br> like this:
<assign property="var:final" value='[eval: "[template:url.content]".replace(/[template:newline.content]/g,"[template:break.content]") ]'/>
<texttemplate name="url"><![CDATA[[var:textfieldcontent]]]></texttemplate>
<texttemplate name="break"><![CDATA[<br/>]]></texttemplate>
<texttemplate name="newline"><![CDATA[\n]]></texttemplate>
The fix that will enable this is on 1.5 Development branch. Hit me up through email and I can move your project to that build if you want to test on it.
Thanks