<p><a href="http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs</a>
<a href="http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty</a> <a href="http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize</a></p>

<p>Standard.json</p>

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

<p><strong>Edit</strong>: This bug also happens in the most recent version of Redactor <a href="https://imperavi.com/redactor/examples/source/" rel="nofollow">as seen on their example page</a>.</p>

CC BY-SA 3.0
2014-10-12T13:56:10.030Z
2016-05-18T14:48:24.823Z
2016-05-18T14:48:24.823Z
Ryan
<p>The rich text editor redactor is adding in additional p tags to rich text content. Is there a way to modify this so it accepts the unmodified HTML but still has the advantage of WYSIWYG editing? </p>

<p>Perhaps it is fixed in version 10.0.1 as I see Craft uses v9.2.6 of this editor. Will it be upgraded perhaps to test?</p>

<p><strong>Update</strong>: This seems to be part of the config: <a href="http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs</a></p>

<p><strong>I believe we should be able to turn on/off some things</strong>. e.g. <a href="http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty</a> <a href="http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize</a></p>

CC BY-SA 3.0
2014-10-10T10:24:11.170Z
Do I get this right, you want to enter/edit HTML code in rich text fields?
carlcs
CC BY-SA 3.0
2014-10-12T06:34:01.373Z
Nup - I can do that already. The problem is toggling between code/wysiwyg is adding p tags in place of my div tags.
Ryan
<redactor>
Rich text editor Redactor adding additional paragraph p tags
# Rich text editor Redactor adding additional paragraph p tags

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

The rich text editor redactor is adding in additional p tags to rich text content. Is there a way to modify this so it accepts the unmodified HTML but still has the advantage of WYSIWYG editing?

Perhaps it is fixed in version 10.0.1 as I see Craft uses v9.2.6 of this editor. Will it be upgraded perhaps to test?

**Update**: This seems to be part of the config: <http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs>

**I believe we should be able to turn on/off some things**. e.g. <http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty> <http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize>

**Tags:** redactor
> **Comments:**
> **username_1**: Do I get this right, you want to enter/edit HTML code in rich text fields?  
> **username_0**: Nup - I can do that already. The problem is toggling between code/wysiwyg is adding p tags in place of my div tags.  

---

## 1 answers

### Answer by username_0 on 2014-10-12. Score: 7 | Accepted answer

http://imperavi.com/redactor/docs/settings/clean/#setting-replaceDivs
http://imperavi.com/redactor/docs/settings/clean/#setting-removeEmpty http://imperavi.com/redactor/docs/settings/clean/#setting-paragraphize
Standard.json
{
    buttons: ['html','formatting','bold','italic','unorderedlist','orderedlist','link','image','video', 'table'],
    plugins: ['fullscreen'],
    toolbarFixedBox: true,
    paragraphize: false,
    replaceDivs: false
}

Edit: This bug also happens in the most recent version of Redactor as seen on their example page.


---

