# PreserveWhitespace option inserts unexpected whitespace

**URL:** https://discuss.prosemirror.net/t/preservewhitespace-option-inserts-unexpected-whitespace/3047
**Category:** Uncategorized
**Created:** [July 28, 2020, 5:18pm UTC](https://discuss.prosemirror.net/t/preservewhitespace-option-inserts-unexpected-whitespace/3047 "2020-07-28T17:18:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joelc](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@joelc](https://discuss.prosemirror.net/u/joelc)
#### Post date: [July 28, 2020, 5:18pm UTC](https://discuss.prosemirror.net/t/preservewhitespace-option-inserts-unexpected-whitespace/3047/1 "2020-07-28T17:18:45Z")

</div>

I need to preserve whitespace at the beginning of paragraphs, which is what it seems like the `preserveWhitespace` option was intended to allow.

The problem is with this option set to true, it inserts a space character after any `<br>` node, and if set to ‘full’, it inserts a newline character after any `<br>` node. This does not seem like intended behavior.

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)
#### Post date: [July 30, 2020, 9:27am UTC](https://discuss.prosemirror.net/t/preservewhitespace-option-inserts-unexpected-whitespace/3047/2 "2020-07-30T09:27:09Z")

</div>

I assume [this issue](https://github.com/ProseMirror/prosemirror/issues/1079) is also from you. Please don’t use multiple channels to report the same thing, it just clogs up notifications.

---

<div class="post-metadata">

### Author: ![joelc](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/j/ebca7d/32.png) [@joelc](https://discuss.prosemirror.net/u/joelc)
#### Post date: [July 30, 2020, 1:17pm UTC](https://discuss.prosemirror.net/t/preservewhitespace-option-inserts-unexpected-whitespace/3047/3 "2020-07-30T13:17:49Z")

</div>

Sorry, thanks for the help! I noticed this discuss page seemed to have a lot more eyeballs on it than the github repo, sorry again.
