# Rich Text Editor Press "Enter" get two carriage returns

**URL:** <https://discourse.joplinapp.org/t/rich-text-editor-press-enter-get-two-carriage-returns/12343>\
**Category:** Support\
**Created:** [10 November 2020 06:48 UTC](https://discourse.joplinapp.org/t/rich-text-editor-press-enter-get-two-carriage-returns/12343 "2020-11-10T06:48:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Daeraxa](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/daeraxa/32/6172_2.png) [@Daeraxa](https://discourse.joplinapp.org/u/Daeraxa)\
**Post date:** [27 October 2021 11:18 UTC](https://discourse.joplinapp.org/t/rich-text-editor-press-enter-get-two-carriage-returns/12343/3 "2021-10-27T11:18:53Z")

</div>

I believe it is simply how the rich text editor (TinyMCE) works.  
Pressing return on the rich text editor ( **without soft breaks enabled** in the markdown options) creates separate `<p>` elements for each line whereas if you press shift+return you get a single `<p>` element with the lines separated by `<br>`.  
e.g.

```auto
<div id="rendered-md">
<p data-source-line="1">lines</p>
<p data-source-line="3">lines</p>
<p data-source-line="5">lines</p>
<p data-source-line="7">line<br>line<br>line</p>
</div>

```

If you were to look at the markdown directly you will have:

```auto
lines<cr><lf>
<cr><lf>
lines<cr><lf>
<cr><lf>
lines<cr><lf>
<cr><lf>
lines<cr><lf>
lines<cr><lf>
lines<cr><lf>

```

The default behaviour of markdown is with "soft breaks" where the last three lines don't have the `<cr><lf>` converted to a `<br>` but Joplin defailt to "hard breaks".  
See - [Markdown Guide | Joplin](https://joplinapp.org/markdown/#plugins)

So basically, pressing "return" on the rich text editor always inserts a full "hard break" rather than "two lines" where shift+return will enter a "soft break" which is rendered differently depending on the `markdown>soft breaks` option.

---

_[View the full topic](https://discourse.joplinapp.org/t/rich-text-editor-press-enter-get-two-carriage-returns/12343)._
