Jump to content

Allow script tags in CKEditor fields


a-ok
 Share

Recommended Posts

Can anyone help me to allow <script></script> tags in CKEditor? It's for an inline cookie consent that needs to be added within a ckeditor text field. I can't figure it out at all from either PW docs or CKEditor docs. Thanks.

Link to comment
Share on other sites

I've added the following to the config.js file, which works, but it then overrides any settings in the Processwire UI...

CKEDITOR.editorConfig = function( config ) {
	config.allowedContent = true;
	config.allowedContent = {
        script:true
	};
};
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...