Title: &#8220;Default value&#8221; field doesn&#8217;t work with &#8220;Code Editor&#8221; control type
Last modified: July 25, 2022

---

# “Default value” field doesn’t work with “Code Editor” control type

 *  Resolved [drichards211](https://wordpress.org/support/users/drichards211/)
 * (@drichards211)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/default-value-field-doesnt-work-with-code-editor-control-type/)
 * Plain text will render properly as the default value. But if you attempt to input
   an html script tag as the default, it won’t show-up.
 * Here’s how to reproduce the problem:
    1) Create a new lazyblock 2) Add a Content
   Control of type: Code Editor 3) Add a Default value which contains an html script
   tag: <script>console.log(‘potato’);</script> 4) Save 5) Add the new block to 
   a Page, and the default value will fail to display.
 * In general, other html tags don’t appear to render either.
    If you were to input
   a default value of: “<p> This is a potato test </p>”
 * The default value will display as “this is a potato test”. All of the html scripting
   appears to be stripped-away.
 * I would assume this is undesired behavior from a Control type called “Code Editor”.
   
   I’m looking for either a workaround, or a bug report. Thanks!
    -  This topic was modified 3 years, 10 months ago by [drichards211](https://wordpress.org/support/users/drichards211/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/default-value-field-doesnt-work-with-code-editor-control-type/#post-15912697)
 * Hey.
 * Yes, looks like we don’t need to strip tags in all block data and controls data(
   not just the Code control, but all controls). I will look at this problem and
   in the next update it will be resolved.
 * Regards, nK.

Viewing 1 replies (of 1 total)

The topic ‘“Default value” field doesn’t work with “Code Editor” control type’ is
closed to new replies.

 * ![](https://ps.w.org/lazy-blocks/assets/icon-256x256.png?rev=2584676)
 * [Custom Block Builder - Lazy Blocks](https://wordpress.org/plugins/lazy-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/lazy-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/lazy-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lazy-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lazy-blocks/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nK](https://wordpress.org/support/users/nko/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/default-value-field-doesnt-work-with-code-editor-control-type/#post-15912697)
 * Status: resolved