<p>Just tried this again in Craft 2.3 and now it works as most people would expect (I know, not as it should for html purists)</p>

<p>Shift Enter = <code>&lt;br&gt;</code></p>

<p>Regular Enters are coded as <code>&lt;p&gt;&lt;br&gt;&lt;/p&gt;</code>, forcing an empty line. For me, this works :-)</p>

<p>This is with 'Clean HTML' selected and HTML purifier OFF</p>

CC BY-SA 3.0
2014-12-18T17:20:58.280Z
Glad to see you got your answer :)
carlcs
CC BY-SA 3.0
2014-12-18T16:37:46.713Z
2014-12-18T16:37:46.713Z
noregt
<p>For me this works: <kbd>Shift</kbd>+<kbd>Enter</kbd></p>

CC BY-SA 3.0
2014-07-31T12:36:34.083Z
Well does it still if you open and then save it again without editing?
noregt
CC BY-SA 3.0
2014-07-31T12:43:22.057Z
Sure. In web apps it's <Shift>+<Enter> and OS X apps it's <Alt>+<Enter>.
carlcs
CC BY-SA 3.0
2014-07-31T12:46:14.203Z
It also works if you copy and paste line breaks from other apps. They appear and get saved in the Redactor field as expected.
carlcs
CC BY-SA 3.0
2014-07-31T12:54:56.597Z
Sorry but my point is that that does not work. I'm aware that you can make a line break '<br>' with Shift Enter. If I make two of those the first save one is left, the second save both are gone.
noregt
CC BY-SA 3.0
2014-07-31T12:58:02.437Z
It works for me, @noregt. Manually adding `<br>`does not though.
carlcs
CC BY-SA 3.0
2014-07-31T13:30:31.837Z
Just tried it again, @noregt! Still works on my install, no matter how many of them I make or how often I save the entry!
carlcs
CC BY-SA 3.0
2014-07-31T14:29:20.197Z
I'll try it with a different install. Maybe it's something specific then. I'll have to test it.
noregt
CC BY-SA 3.0
2014-07-31T15:37:06.500Z
Yep. I just tested it for you on another install (long time untouched and still on 1.3) and it worked there, too. Good luck, @noregt!
carlcs
CC BY-SA 3.0
2014-10-26T04:52:02.223Z
Not working for me on a bare Craft install...
Marion Newlevant
CC BY-SA 3.0
2014-10-30T15:41:11.060Z
@Marion yes I also noticed that multiple `<br>` only work with older versions of Craft / Redactor.
carlcs
CC BY-SA 3.0
2014-07-31T10:52:17.743Z
2014-07-31T10:52:17.743Z
carlcs
<p><strong>Single Line-Break</strong></p>

<p>To insert a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br" rel="nofollow">line-break <code>&lt;br&gt;</code></a> into a Redactor text field use <kbd>Shift</kbd>+<kbd>Enter</kbd> on your keyboard.</p>

<p>Do this for single <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br" rel="nofollow">line-breaks</a> only! You or your client should not misuse the <code>&lt;br&gt;</code> tag for  styling purposes by adding multiple of them in a row. It is semantically wrong (and you can't be sure how browsers interpret it). </p>

<p>With older versions of Redactor / Craft it was possible to do this. I can still save Redactor fields with <code>&lt;br&gt;&lt;br&gt;&lt;br&gt;</code> on a Craft 1.3 installation, but something must have changed down the road, because now all but one gets removed.</p>

<p>But there's other ways to make adding vertical space within a Redactor field possible:</p>

<p><strong>Horizontal Line</strong></p>

<p>If it matches the semantic meaning of that space you create, what about using a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr" rel="nofollow">horizontal line <code>&lt;hr&gt;</code></a> instead and style it to your needs:</p>

<pre><code>hr {
  height: 3em;
  visibility: hidden;
}
</code></pre>

<p>Redactor has a build-in button for <code>&lt;hr&gt;</code>. Edit your <a href="http://buildwithcraft.com/docs/rich-text-fields#redactor-configs" rel="nofollow">Redactor configs</a> for it to show up:</p>

<pre><code>{
    buttons: [
        'html','formatting','bold','italic',
        'unorderedlist','orderedlist','link','image','video',
        'horizontalrule'
    ],
    plugins: ['fullscreen'],
    toolbarFixedBox: true
}
</code></pre>

<p><strong>DIV</strong></p>

<p>That vertical space should not have any semantic meaning at all and you simply want an option to insert some beautiful white space? Then it gets a bit more complicated, because what you should add to your markup in this case is a sematically meaningless element, a <code>div</code> or <code>span</code>.</p>

<p>To do this, switch to "HTML Mode" in your Redactor field and add an empty <code>div</code> inbetween your paragraphs:</p>

<pre><code>&lt;p&gt;
        More white space for these paragraphs, please!
&lt;/p&gt;
&lt;div class="whitespace"&gt;&lt;div&gt;
&lt;p&gt;
        More white space for these paragraphs, please!
&lt;/p&gt;
</code></pre>

<p>You have to configure Redactor to not convert <code>div</code> on save by setting <code>convertDivs:false</code>. (note that this setting <a href="http://imperavi.com/redactor/docs/whats-new-10/" rel="nofollow">will be renamed to <code>replaceDivs</code></a> with Redactor 10).</p>

<p>To make inserting such <code>div</code> easier, write you own little Craft / Redactor plugin that inserts the HTML with the click on a button and add some CSS to style your white space on the backend. A good starting point for the JS might be the <a href="http://imperavi.com/redactor/examples/insert-html/" rel="nofollow">"Insert HTML" Redactor plugin</a>.</p>

<p>The <a href="http://imperavi.com/redactor/examples/insert-html/" rel="nofollow">Craft plugin "RedactorClips"</a> could be an alternative, but I think there's no option to set custom CSS for the backend.</p>

CC BY-SA 3.0
2014-11-01T21:09:23.013Z
The [RedactorClips](https://github.com/pixelandtonic/RedactorClips) plugin mysteriously fails to add the clip. I can't get [RedactorStyles](https://github.com/aelvan/RedactorStyles-Craft/) to add the div either, but it does have a way to set the backend CSS.
Marion Newlevant
CC BY-SA 3.0
2014-11-01T22:44:38.810Z
Yeah, I behaves strange for me too if I add the whitespace clip within a paragraph. Did work though in a new paragraph: hit enter and then add the clip. But as I wrote, it's probably better to write a custom plugin (incl. backend CSS). What about using a `hr`? Doesn't fit your needs, @Marion?
carlcs
CC BY-SA 3.0
2014-11-02T17:27:16.803Z
It's not semantic whitespace, so not `hr`. Best I came up with is a paragraph with a spacer `img`. That `div` is definitely better.
Marion Newlevant
CC BY-SA 3.0
2014-10-30T15:37:54.233Z
2014-10-30T15:52:04.320Z
2014-10-30T15:52:04.320Z
carlcs
<p>I've been trying to add extra line breaks to a text field, But this seems impossible?</p>

<p>Most logical thing to do for the user would be to give it an extra linebreak <code>&lt;br&gt;</code></p>

<p>Those get deleted, sometimes directly, sometimes after opening and then saving again</p>

<p>So far I've tried:</p>

<ul>
<li>disable cleanup html in the field - still deletes <code>&lt;br&gt;</code></li>
</ul>

<p>In the json file settings:</p>

<ul>
<li>tidyHtml: false - no</li>
<li>cleanSpaces: false - no</li>
<li><p>removeEmptyTags: false - no</p></li>
<li><p>linebreaks: true - this converts ALL breaks to line breaks. Not handy.</p></li>
</ul>

CC BY-SA 3.0
2014-07-31T10:49:34.430Z
Noregt, why would you want to do this? This is considered as bad practice, you won't even know how a browser interprets it actually.
carlcs
CC BY-SA 3.0
2014-07-31T10:55:00.700Z
IGNORE that comment, I first thought you want to produce several line breaks like so: `<br><br>`! Better don't do that, but a single `<br>` is totally legitimate.
carlcs
CC BY-SA 3.0
2014-07-31T12:36:00.910Z
Yes that is, but it is erased every time. Furthermore it is the wish/demand of my client and he is not the first one to ask this.
noregt
CC BY-SA 3.0
2014-07-31T12:56:48.750Z
Don't forget to tell the client to only use it (in those rather rare situations) where it is actually appropriate. Once they learned it, they may not use a normal "paragraph" <enter> again :D
carlcs
<richtext><redactor>
Placing an extra empty linebreak in the Redactor Field
# Placing an extra empty linebreak in the Redactor Field

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

I've been trying to add extra line breaks to a text field, But this seems impossible?

Most logical thing to do for the user would be to give it an extra linebreak

Those get deleted, sometimes directly, sometimes after opening and then saving again

So far I've tried:

* disable cleanup html in the field - still deletes

In the json file settings:

* tidyHtml: false - no
* cleanSpaces: false - no
* removeEmptyTags: false - no
* linebreaks: true - this converts ALL breaks to line breaks. Not handy.

**Tags:** richtext, redactor

> **Comments:**
> **username_1**: Noregt, why would you want to do this? This is considered as bad practice, you won't even know how a browser interprets it actually.  
> **username_1**: IGNORE that comment, I first thought you want to produce several line breaks like so: `<br><br>`! Better don't do that, but a single `<br>` is totally legitimate.  
> **username_0**: Yes that is, but it is erased every time. Furthermore it is the wish/demand of my client and he is not the first one to ask this.  
> **username_1**: Don't forget to tell the client to only use it (in those rather rare situations) where it is actually appropriate. Once they learned it, they may not use a normal "paragraph" <enter> again :D  

---

## 3 answers

### Answer by username_0 on 2014-12-18. Score: 2 | Accepted answer

Just tried this again in Craft 2.3 and now it works as most people would expect (I know, not as it should for html purists)

Shift Enter =

Regular Enters are coded as , forcing an empty line. For me, this works :-)

This is with 'Clean HTML' selected and HTML purifier OFF

> **Comments:**
> **username_1**: Glad to see you got your answer :)  

---

### Answer by username_1 on 2014-07-31. Score: 2

For me this works: `Shift`+`Enter`

> **Comments:**
> **username_0**: Well does it still if you open and then save it again without editing?  
> **username_1**: Sure. In web apps it's <Shift>+<Enter> and OS X apps it's <Alt>+<Enter>.  
> **username_1**: It also works if you copy and paste line breaks from other apps. They appear and get saved in the Redactor field as expected.  
> **username_0**: Sorry but my point is that that does not work. I'm aware that you can make a line break '<br>' with Shift Enter. If I make two of those the first save one is left, the second save both are gone.  
> **username_1**: It works for me, @username_0. Manually adding `<br>`does not though.  
> **username_1**: Just tried it again, @username_0! Still works on my install, no matter how many of them I make or how often I save the entry!  
> **username_0**: I'll try it with a different install. Maybe it's something specific then. I'll have to test it.  
> **username_1**: Yep. I just tested it for you on another install (long time untouched and still on 1.3) and it worked there, too. Good luck, @username_0!  
> **username_2**: Not working for me on a bare Craft install...  
> **username_1**: @Marion yes I also noticed that multiple `<br>` only work with older versions of Craft / Redactor.  

---

### Answer by username_1 on 2014-10-30. Score: 0

Single Line-Break
To insert a line-break  into a Redactor text field use Shift+Enter on your keyboard.
Do this for single line-breaks only! You or your client should not misuse the  tag for  styling purposes by adding multiple of them in a row. It is semantically wrong (and you can't be sure how browsers interpret it). 
With older versions of Redactor / Craft it was possible to do this. I can still save Redactor fields with  on a Craft 1.3 installation, but something must have changed down the road, because now all but one gets removed.
But there's other ways to make adding vertical space within a Redactor field possible:
Horizontal Line
If it matches the semantic meaning of that space you create, what about using a horizontal line  instead and style it to your needs:
hr {
  height: 3em;
  visibility: hidden;
}

Redactor has a build-in button for . Edit your Redactor configs for it to show up:
{
    buttons: [
        'html','formatting','bold','italic',
        'unorderedlist','orderedlist','link','image','video',
        'horizontalrule'
    ],
    plugins: ['fullscreen'],
    toolbarFixedBox: true
}

DIV
That vertical space should not have any semantic meaning at all and you simply want an option to insert some beautiful white space? Then it gets a bit more complicated, because what you should add to your markup in this case is a sematically meaningless element, a div or span.
To do this, switch to "HTML Mode" in your Redactor field and add an empty div inbetween your paragraphs:

        More white space for these paragraphs, please!



        More white space for these paragraphs, please!


You have to configure Redactor to not convert div on save by setting convertDivs:false. (note that this setting will be renamed to replaceDivs with Redactor 10).
To make inserting such div easier, write you own little Craft / Redactor plugin that inserts the HTML with the click on a button and add some CSS to style your white space on the backend. A good starting point for the JS might be the "Insert HTML" Redactor plugin.
The Craft plugin "RedactorClips" could be an alternative, but I think there's no option to set custom CSS for the backend.

> **Comments:**
> **username_2**: The [RedactorClips](https://github.com/pixelandtonic/RedactorClips) plugin mysteriously fails to add the clip. I can't get [RedactorStyles](https://github.com/aelvan/RedactorStyles-Craft/) to add the div either, but it does have a way to set the backend CSS.  
> **username_1**: Yeah, I behaves strange for me too if I add the whitespace clip within a paragraph. Did work though in a new paragraph: hit enter and then add the clip. But as I wrote, it's probably better to write a custom plugin (incl. backend CSS). What about using a `hr`? Doesn't fit your needs, @Marion?  
> **username_2**: It's not semantic whitespace, so not `hr`. Best I came up with is a paragraph with a spacer `img`. That `div` is definitely better.  

---

