I installed a blog module that allows me to add blogs to my Yii2 app. Everything works well except the editor. I think Yii2 by default uses redactor.
The problem is that when I add code with using the code interface, all DIV tags are converted automatically to P tags.

I have checked through the redactor configuration but it does not look like there is a setting to adjust this:
'redactor' => [
'class' => 'yii\redactor\RedactorModule',
'uploadDir' => '@frontend/images/blog/upload',
'uploadUrl' => '/sites/eop/frontend/images/blog/upload',
'imageAllowExtensions' => ['jpg', 'png', 'gif', 'svg'],
],
Any idea on where else to look at?
You need to use the
replaceDivsoption, and set it tofalseunder the client options. See the below code for an exampleif you are using an
ActiveFormit should be like