Is there a known issue with the setting redactor.convertDivs

I want to disable the conversion of div into p-tags, because the surrounding of some snippets shouldn’t be a paragraph. The setting redactor.convertDivs doesn’t work. Is there a known bug?

I’m using redactor 2.0.4

Hi Thorsten,

You might need to also disable paragraphy which will also attempt to put all content inside a paragraph text. If you haven’t looked at it before, ContentBlocks is also a great way to truly separate what is rich text and what is a snippet (or other “rich” elements that aren’t textual content). ContentBlocks gives you a lot more freedom in defining markup, without the RTE getting in the way of formatting it exactly the way you want it to.

Sorry, Mark, for my late reply to your answer. There was no message mail to inform me you have answered.
Thanks for your hint. And yes, I know content blocks but this isn’t the solution of my problem - just to avoid to convert a div-tag into a p-tag I have to use content blocks?

Back to my problem:
If I understand you right, redactor.paragraphize should set to “no” in addition of “redactor.convertDivs” (“no”) - but the div-tag is still converting.

Any other ideas, Mark?

Greeting and have a great x-mas,


Redactor v10 has many cleanup related settings that may affect one another. You may also want to look at these Settings:

Make sure ‘div’ isn’t denied by Denied Tags

Look at both of these

It’s a lot of settings, I know. If you have a specific example and/or want to shoot Manager credentials to us through our support system we can investigate it further.

Good news is, Redactor v11 (the new version by Imperavi) is simpler and has less settings. There is a setting to tell the editor to really really, like for reals not clean up the mark up. So I’m hoping once we get updated to that version it will remove these types of pain points for a lot of users.

That said, if you are trying to do layout markup within the editor, you might be pushing it to it’s limits. At that point, we recommend using Redactor instances within ContentBlocks layouts.

Maybe it’s not good habit to mix layout markup, but this should be fixed. Simply by clicking “Convert Divs” to “No”. Not by guessing different setting combinations.

Yeah, streamlining the configuration is high on our list for the future of Redactor. There are too many settings, and it’s not always clear when to use what. The vast majority of these settings are simply redactor.js configuration options we expose to our users, but we still need to do whatever we can to make it easier to understand them and to solve common use cases.

How to i avoid divs converting to p-tags.

Is this issue still “on hold”?

As per this post with both redactor.convertDivs and redactor.replaceDivs settings set to no does the trick. As this keeps coming up regularly I’ve just added it to the Redactor FAQs, something we should definitely do more often :stuck_out_tongue: