# JavaScript does not evaluate in Text components

**URL:** <https://forum.builder.io/t/javascript-does-not-evaluate-in-text-components/3718>\
**Category:** Visual Editor Help\
**Created:** [June 15, 2023, 9:58am UTC](https://forum.builder.io/t/javascript-does-not-evaluate-in-text-components/3718 "2023-06-15T09:58:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicluciano](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@nicluciano](https://forum.builder.io/u/nicluciano)\
**Post date:** [June 15, 2023, 9:58am UTC](https://forum.builder.io/t/javascript-does-not-evaluate-in-text-components/3718/1 "2023-06-15T09:58:00Z")

</div>

When using curly braces to evaluate a JavaScript expression in a basic Text component, the JavaScript is not evaluated consistently. In the attached video you can see the steps to reproduce the bug:

1. Create a basic Text component.
2. Enter a JavaScript expression in curly braces. It evaluates and renders correctly.
3. **Refresh the page. Now the expression is no longer being evaluated.**
4. Type into the text component. It will start evaluating and rendering correctly again.
5. Refresh the page. Now the expression is no longer being evaluated.
6. Repeat…

**Video** : [builderio-expression-bug.webm - Google Drive](https://drive.google.com/file/d/1umXjgaZnFP1bZhWIJ0KJ2JoGgPGiZNwL/view)  
**Builder content link** : [Builder.io: Drag & Drop Headless CMS](https://builder.io/content/050725d02bc743e1ab0dcda93fb28da1)  
**Builder public api key** : cdea98614de745fdb32a17d23b2dc508  
**Stack** : I noticed the bug in a NextJS app, but for the video I reproduced it using the [Builder.io](http://Builder.io) fallback editor with no integration.

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [July 7, 2023, 4:16pm UTC](https://forum.builder.io/t/javascript-does-not-evaluate-in-text-components/3718/2 "2023-07-07T16:16:52Z")

</div>

Hi @nicluciano, Thank you for bringing this up, however, this is not a bug. Rich text editor will render everything as text. For this, you can use a [Custom code](https://www.builder.io/c/docs/guides/custom-code) block, or for text block use Data Bindings.

Video:- [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/dec98dbb087e4606bb72f2bf0e90b5cb)
