Jump to content

CKEditor converting divs/classes to <p>


Penfold
 Share

Recommended Posts

Good morning

I have an issue with the CKeditor html editor converting/stripping <div> to <p> when the update is saved.

I have tried editing the config.js file by adding both

config.extraAllowedContent= 'div(*)'; and config.allowedContent= true;

I have added these to the below files but it makes no difference so am unsure which file I am missing for the changes to be effective?

  • .wire-3.0.180\modules\Inputfield\InputfieldCKEditor\ckeditor-4.16.0\config.js
  • site\modules\AdminOnSteroids\CKE\config.js
  • site\modules\AdminOnSteroids\CKE\sample-cke.js
  • site\modules\InputfieldCKEditor\config-body.js
  • site\modules\InputfieldCKEditor\config.js

Thanks for any help

Pen

Link to comment
Share on other sites

Hi,

have you tried adding CreateDiv to CKeditor toolbar ?
you'll find it in the field setting "input" tab => CKEditor settings
this allows you not only to create div directly from the toolnar but will also keep yours if you wrote some in the source code

hope it helps

have a nice day

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...