Answers.Body: <p>Store it in a plaintext field, then when you output it, do: <code>{{ entry.myfield | raw }}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-27T21:30:19.780Z
Answers.LastActivityDate: 2015-11-27T21:30:19.780Z
Answers.UserDisplayName: andrew.welch
Body: <p>I need to store Javascript/HTML code in some of our entries. I have tried to put the code in plaintext but cannot get the code to render through twig. I cannot store this stuff on the filesystem. It really needs to be attached to an entry if possible.</p>
  
  <p>Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-28T20:26:42.123Z
Comments.Text: There are a few plugins which make adding code to entries a nicer experience... Check out [Ace Freely](https://github.com/httpster/Ace-Freely) or [Code Block](https://github.com/lindseydiloreto/craft-codeblock).
Comments.UserDisplayName: Lindsey D
Tags: <fieldtypes>
Title: How do I store code in Craft
ThreadText: # How do I store code in Craft
  
  (Asked by: username_0 on 2015-11-27)
  
  I need to store Javascript/HTML code in some of our entries. I have tried to put the code in plaintext but cannot get the code to render through twig. I cannot store this stuff on the filesystem. It really needs to be attached to an entry if possible.
  
  Any ideas?
  
  **Tags:** fieldtypes
  
  > **Comments:**
  > **username_1**: There are a few plugins which make adding code to entries a nicer experience... Check out [Ace Freely](https://github.com/httpster/Ace-Freely) or [Code Block](https://github.com/lindseydiloreto/craft-codeblock).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-11-27. Score: 4 | Accepted answer
  
  Store it in a plaintext field, then when you output it, do: `{{ entry.myfield | raw }}`
  
  
  ---
  
  