I'm trying to add some embed code/script and the rich text field on save puts misc <p> tags around my code.

How do I save code so it keeps it's code formatting without adding an extra stuff?


You probably need to set the Redactor allowedTags config setting to allow <script> tags.

You can see how to define custom Redactor configs in Craft here.

| improve this answer | |
  • Still had some issues if I turned to code view...ended up just putting embed in template. Thanks for the help. – frshjb373 Sep 19 '14 at 21:19

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.