<p>Script tags should be put in plain text field types (if they need to be editable by the client at all, otherwise put them in the templates).</p>

CC BY-SA 3.0
2015-06-25T14:29:24.897Z
2015-06-26T09:52:09.367Z
2015-06-26T09:52:09.367Z
darylknight
<p>I'm trying to configure a rich text field to allow script tags for a demo section on the page.</p>

<p>I added the following settings and linked this to the field</p>

<pre><code>    {
  buttons: ['html','bold','italic','unorderedlist','orderedlist','link','image'],
  plugins: ['fullscreen'],
  toolbarFixedBox: true,
  replaceDivs: false,
  paragraphize: false,
  replaceDivs: false,
  deniedTags: [],
  removeComments: false,
  cleanSpaces: false,
  cleanOnPaste: false,
  removeDataAttr: false
}
</code></pre>

<p>However, The script tag is still always removed on save. Is there some other setting i am missing?</p>

CC BY-SA 3.0
2015-06-09T15:55:54.510Z
Why do you use a Redactor field for JS scripts to run on your site?
carlcs
CC BY-SA 3.0
2015-06-09T18:44:04.590Z
Following @carlcs's comment - it seems like you'd be better off putting the script code in a plain text field instead of fighting to get the WYSIWYG to let them though.
Brad Bell
<entries><redactor>
Allow Script Text in Rich Text
# Allow Script Text in Rich Text

(Asked by: username_0 on 2015-06-09)

I'm trying to configure a rich text field to allow script tags for a demo section on the page.
I added the following settings and linked this to the field
    {
  buttons: ['html','bold','italic','unorderedlist','orderedlist','link','image'],
  plugins: ['fullscreen'],
  toolbarFixedBox: true,
  replaceDivs: false,
  paragraphize: false,
  replaceDivs: false,
  deniedTags: [],
  removeComments: false,
  cleanSpaces: false,
  cleanOnPaste: false,
  removeDataAttr: false
}

However, The script tag is still always removed on save. Is there some other setting i am missing?

**Tags:** entries, redactor

> **Comments:**
> **username_1**: Why do you use a Redactor field for JS scripts to run on your site?  
> **username_2**: Following @username_1's comment - it seems like you'd be better off putting the script code in a plain text field instead of fighting to get the WYSIWYG to let them though.  

---

## 1 answers

### Answer by username_3 on 2015-06-25. Score: 3

Script tags should be put in plain text field types (if they need to be editable by the client at all, otherwise put them in the templates).


---

