<p>Assuming you are using the Rich Text field, you'll want to look at the <a href="http://imperavi.com/redactor/docs/settings/#set-convertDivs">Redactor setting</a>, <code>convertDivs</code>.</p>

<blockquote>
  <p>convertDivs <strong>(Default setting is true)</strong></p>
  
  <p>With this option turned on, Redactor will automatically replace divs to paragraphs.</p>
</blockquote>

<p>Go in to your field settings:
Craft Admin &rsaquo; Settings &rsaquo; Fields &rsaquo; <strong>Rich Text field name</strong></p>

<p>Look at the config settings to determine which config file you are using. Then, go in to your <code>craft/config/redactor/ConfigFile.json</code> file and edit your redactor settings to exclude the <code>convertDivs</code> setting (assuming nothing else in your config file):</p>

<pre><code>{
    convertDivs: false
}
</code></pre>

CC BY-SA 3.0
2014-07-21T22:16:04.030Z
2014-07-21T22:16:04.030Z
Ryan Shrum
<p>I have a problem when trying to put a div into a content of an entry.</p>

<p>I'm creating entries, building a HTML hierarchy that helps me to manipulate the content with JS. I'm adding divs an build something like this:</p>

<pre><code>&lt;div id="cont1" class="content" &gt;
  &lt;h3&gt;Hi I am a title&lt;/h3&gt;
  &lt;p&gt;this is the introduction &lt;/p&gt;
  &lt;p&gt;this is the content&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>When I create this, the hierarchy is right, but when I edit it from the CP, all the divs change to this:</p>

<pre><code>&lt;p id="cont1" class="content" &gt;&lt;/p&gt;
&lt;h3&gt;Hi I am a title&lt;/h3&gt;
&lt;p&gt;this is the introduction &lt;/p&gt;
&lt;p&gt;this is the content&lt;/p&gt;
</code></pre>

<p>What can I do to prevent this from happening? Hope you can help me, thanks.</p>

<entries>
Div into the content of an Entry
# Div into the content of an Entry

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

I have a problem when trying to put a div into a content of an entry.
I'm creating entries, building a HTML hierarchy that helps me to manipulate the content with JS. I'm adding divs an build something like this:

  Hi I am a title
  this is the introduction 
  this is the content


When I create this, the hierarchy is right, but when I edit it from the CP, all the divs change to this:

Hi I am a title
this is the introduction 
this is the content

What can I do to prevent this from happening? Hope you can help me, thanks.

**Tags:** entries


---

## 1 answers

### Answer by username_1 on 2014-07-21. Score: 6 | Accepted answer

Assuming you are using the Rich Text field, you'll want to look at the Redactor setting, convertDivs.

convertDivs (Default setting is true)
With this option turned on, Redactor will automatically replace divs to paragraphs.

Go in to your field settings:
Craft Admin › Settings › Fields › Rich Text field name
Look at the config settings to determine which config file you are using. Then, go in to your craft/config/redactor/ConfigFile.json file and edit your redactor settings to exclude the convertDivs setting (assuming nothing else in your config file):
{
    convertDivs: false
}


---

