<p>RichText fields make use of the Redactor plugin library, which if I understand correctly, essentially parses line-breaks and wraps lines in properly formatted html <code>&lt;p&gt;</code> tags via javascript. However, when you save from the front-end, it doesn't have a chance yet to parse the data. Only when you view the data on the back-end and re-save does redactor get a chance to do it's thing.</p>

<ul>
<li><p>You could use redactor on the front-end, although this is not recommended for various reasons <a href="https://craftcms.stackexchange.com/a/4238/784">as described here</a>.</p></li>
<li><p>Or you could change the fieldtype to a regular textField and wrap everything in a <code>&lt;pre&gt;</code> tag in your template. <code>&lt;pre&gt;{{ entry.myTextField }}&lt;/pre&gt;</code></p></li>
<li><p>Or you could parse the string yourself via javascript before submitting it, wrapping your own <code>&lt;p&gt;</code> tags (hopefully it won't get double encoded).</p></li>
</ul>

<p>There might be other options as well.</p>

CC BY-SA 3.0
2015-02-05T19:49:11.473Z
2015-02-05T20:02:33.497Z
2017-04-13T12:51:00.253Z
Douglas McDonald
<p>I have set up a guest entries form that receives data from the textarea snippet below and saves it into a rich text field.</p>

<pre><code>&lt;textarea name="fields[comment]" placeholder="Join the discussion..."&gt;&lt;/textarea&gt;
</code></pre>

<p>When I view the entry on the front-end there is no formatting, but on the backend there is formatting. Then when I save the entry on the back-end, suddenly there is formatting on the front-end.</p>

<p>Is there anyway to bypass having to re-save the entry to get the desired formatting?</p>

CC BY-SA 3.0
2015-02-05T19:17:01.657Z
Is it a Rich Text field?
Ryan Shrum
CC BY-SA 3.0
2015-02-05T19:27:19.137Z
Yes. And when I view source in Redactor I can see paragraph tags that start to show up after I save the entry again.
Allen Pieper
CC BY-SA 3.0
2015-02-05T19:57:52.803Z
Without using a JavaScript parser, not sure you'd be able to achieve what you're looking for. Unless of course you want to allow Redactor on the front-end. http://craftcms.stackexchange.com/questions/4225/how-do-i-enable-redactor-rich-text-editor-in-a-front-end-form
Ryan Shrum
<richtext><guest-entries>
How do I maintain paragraph formatting on textarea Guest Entries submission?
# How do I maintain paragraph formatting on textarea Guest Entries submission?

(Asked by: username_0 on 2015-02-05)

I have set up a guest entries form that receives data from the textarea snippet below and saves it into a rich text field.


When I view the entry on the front-end there is no formatting, but on the backend there is formatting. Then when I save the entry on the back-end, suddenly there is formatting on the front-end.
Is there anyway to bypass having to re-save the entry to get the desired formatting?

**Tags:** richtext, guest-entries
> **Comments:**
> **username_1**: Is it a Rich Text field?  
> **username_0**: Yes. And when I view source in Redactor I can see paragraph tags that start to show up after I save the entry again.  
> **username_1**: Without using a JavaScript parser, not sure you'd be able to achieve what you're looking for. Unless of course you want to allow Redactor on the front-end. http://craftcms.stackexchange.com/questions/4225/how-do-i-enable-redactor-rich-text-editor-in-a-front-end-form  

---

## 1 answers

### Answer by username_2 on 2015-02-05. Score: 2 | Accepted answer

RichText fields make use of the Redactor plugin library, which if I understand correctly, essentially parses line-breaks and wraps lines in properly formatted html  tags via javascript. However, when you save from the front-end, it doesn't have a chance yet to parse the data. Only when you view the data on the back-end and re-save does redactor get a chance to do it's thing.

You could use redactor on the front-end, although this is not recommended for various reasons as described here.
Or you could change the fieldtype to a regular textField and wrap everything in a  tag in your template. {{ entry.myTextField }}
Or you could parse the string yourself via javascript before submitting it, wrapping your own  tags (hopefully it won't get double encoded).

There might be other options as well.


---

