<p>This is a feature of "redactor" which is used with Craft to clean and format input. </p>

<p>To change the settings, you need to change the config in Craft/config/redactor/. See <a href="http://buildwithcraft.com/docs/rich-text-fields" rel="nofollow">http://buildwithcraft.com/docs/rich-text-fields</a> and <a href="http://imperavi.com/redactor/docs/settings/clean/#setting-allowedTags" rel="nofollow">http://imperavi.com/redactor/docs/settings/clean/#setting-allowedTags</a></p>

<p>This is not, however, working for me with iframes, which is a whole other issue.</p>

CC BY-SA 3.0
2015-09-22T22:13:00.013Z
2015-09-22T22:13:00.013Z
Kenneth Benjamin
<p>From my personal experience, this is the type of thing that occurs when PHP/HTML set-up has a bug. </p>

<p>You could be having an issue using the Rich Text input for entering HTML for that reason.</p>

<p>Perhaps you could try making the edit in your website templates/css directly.</p>

<p>You can find tutorials to help you on <a href="http://buildwithcraft.com/docs/introduction" rel="nofollow">http://buildwithcraft.com/docs/introduction</a></p>

CC BY-SA 3.0
2015-08-14T18:29:57.733Z
2015-08-19T19:10:34.103Z
2015-08-19T19:10:34.103Z
Matteo
<p>Any code that I previously inserted using the html button on the rich text wysiwyg is removed when I click into edit the html within a post. Only <code>&lt;p></code> tags remain. </p>

<p>I have turned off the "Clean html" and the "Purify html" in the settings for the body field (rich text field), and have tried to enter iframes (videos).  I can insert them initially, but if I go back to the edit as rich text, and then click to edit the html, any iframes, divs or tags other than <code>&lt;p></code> tags are stripped out of the code. </p>

<p>I cannot edit html in any posts that have videos else the videos are stripped out. </p>

<p>I have also downloaded a fresh install of Craft to make sure that it wasn't just my install.  I encountered the same issue.  </p>

<p>Can someone tell me what is going on? </p>

CC BY-SA 3.0
2015-08-12T17:53:11.457Z
Same thing happens for me... I'll have my text and I put in an image, then edit it, and it disappears. When I click the code button this is what shows up- `<p><span id="redactor-image-box" data-redactor="verified" contenteditable="false" style="float: left;"></span>
</p>`
user3259420
<redactor><richtext><wysiwyg>
WYSIWYG removes HTML button all non-<p> tags when view source
# WYSIWYG removes HTML button all non-<p> tags when view source

(Asked by: username_0 on 2015-07-23)

Any code that I previously inserted using the html button on the rich text wysiwyg is removed when I click into edit the html within a post. Only  tags remain.

I have turned off the "Clean html" and the "Purify html" in the settings for the body field (rich text field), and have tried to enter iframes (videos). I can insert them initially, but if I go back to the edit as rich text, and then click to edit the html, any iframes, divs or tags other than  tags are stripped out of the code.

I cannot edit html in any posts that have videos else the videos are stripped out.

I have also downloaded a fresh install of Craft to make sure that it wasn't just my install. I encountered the same issue.

Can someone tell me what is going on?

**Tags:** redactor, richtext, wysiwyg
> **Comments:**
> **username_1**: Same thing happens for me... I'll have my text and I put in an image, then edit it, and it disappears. When I click the code button this is what shows up- `<p><span id="redactor-image-box" data-redactor="verified" contenteditable="false" style="float: left;"></span> </p>`  

---

## 2 answers

### Answer by username_2 on 2015-09-22. Score: 2

This is a feature of "redactor" which is used with Craft to clean and format input.

To change the settings, you need to change the config in Craft/config/redactor/. See <http://buildwithcraft.com/docs/rich-text-fields> and <http://imperavi.com/redactor/docs/settings/clean/#setting-allowedTags>

This is not, however, working for me with iframes, which is a whole other issue.


---

### Answer by username_3 on 2015-08-14. Score: 1

From my personal experience, this is the type of thing that occurs when PHP/HTML set-up has a bug.

You could be having an issue using the Rich Text input for entering HTML for that reason.

Perhaps you could try making the edit in your website templates/css directly.

You can find tutorials to help you on <http://buildwithcraft.com/docs/introduction>


---

