3

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 <p> 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 <p> 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?

  • 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 Aug 12 '15 at 17:53
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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.