<p>When you create a Rich Text field, there is an option for <code>Clean up HTML</code> which is checked by default. The description underneath the setting reads:</p>

<blockquote>
  <p>Removes spans, empty tags, and most style attributes on save.</p>
</blockquote>

<p>When aligning text in Redactor, inline styling is added, which would be stripped away on save if the <code>Clean up HTML</code> option is checked.</p>

<p>You'll just need to uncheck this option in your field settings if you want inline styles to be saved.</p>

CC BY-SA 3.0
2014-10-31T15:03:53.863Z
2014-10-31T15:21:53.110Z
2014-10-31T15:21:53.110Z
Jamie Wade
<p>How am I to center text with in the rich text field type? It centers while I'm editing, then returns to left align on save (and on output). I feel like I'm missing something obvious here...</p>

<richtext><redactor>
On entry save/update, centered text returns to left in rich text field
# On entry save/update, centered text returns to left in rich text field

(Asked by: username_0 on 2014-10-31)

How am I to center text with in the rich text field type? It centers while I'm editing, then returns to left align on save (and on output). I feel like I'm missing something obvious here...

**Tags:** richtext, redactor

---

## 1 answers

### Answer by username_1 on 2014-10-31. Score: 7 | Accepted answer

When you create a Rich Text field, there is an option for `Clean up HTML` which is checked by default. The description underneath the setting reads:

> Removes spans, empty tags, and most style attributes on save.

When aligning text in Redactor, inline styling is added, which would be stripped away on save if the `Clean up HTML` option is checked.

You'll just need to uncheck this option in your field settings if you want inline styles to be saved.


---

