# Wix Studio - How To Format Text As Code

**URL:** <https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715>\
**Category:** Ask the community\
**Tags:** design, wix-blog, question, code, wix\
**Created:** [February 14, 2025, 10:15am UTC](https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715 "2025-02-14T10:15:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Trickett](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/craig_trickett/32/105308_2.png) [@Craig\_Trickett](https://forum.wixstudio.com/u/Craig_Trickett)\
**Post date:** [February 14, 2025, 10:15am UTC](https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715/1 "2025-02-14T10:15:43Z")

</div>

**Question:**  
Using Wix Studio, how can I format text as code?

I found this article about Wix Editor but I do not see the same function in Wix Studio

> **[Wix Blog: Editing the Text Formatting of Your Blog Posts | Help Center | Wix.com](https://support.wix.com/en/article/wix-blog-editing-the-text-formatting-of-your-blog-posts#inserting-quotes-or-code-snippets-into-your-post)**
>
> After you've created a post, you can edit your post's text formatting at any time in the Post Composer. Use the Post Composer's rich text editor to make changes

**Product:**  
Wix Studio

**What are you trying to achieve:**  
I’m writing a web page with a mixture of normal paragraph text and some code snippets. I want my code snippets to be correctly formatted.

---

<div class="post-metadata">

**Author:** ![amandam](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/amandam/32/79539_2.png) [@amandam](https://forum.wixstudio.com/u/amandam)\
**Post date:** [February 14, 2025, 3:38pm UTC](https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715/2 "2025-02-14T15:38:42Z")

</div>

You can use the Rich Content field in the CMS - it won’t have color highlighting, but will format a code snippet. If you need somehting more advanced looking, you may need to build a custom element.

Rich content article: [CMS: Adding and Setting Up 'Rich Content' Fields | Help Center | Wix.com](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-rich-content-and-adding-it-to-a-dynamic-page?tabs=Studio-Editor)

What it will look like in your editor when connected

 ![rich-content](https://us1.discourse-cdn.com/wix/original/3X/c/3/c348490a9d2d2310e7237c6187107a7a60595192.jpeg)

---

<div class="post-metadata">

**Author:** ![Craig\_Trickett](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/craig_trickett/32/105308_2.png) [@Craig\_Trickett](https://forum.wixstudio.com/u/Craig_Trickett)\
**Post date:** [February 27, 2025, 2:14pm UTC](https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715/3 "2025-02-27T14:14:26Z")

</div>

Thank you @amandam

This seems to work nicely, a little over complicated but it does work.

The only issue I have with it is scaling, My normal text on my page is set to  
“Scale Proportionally”

I don’t see a way to get my code blocks to have this option.  
Every time I test a mobile / tablet version my normal text shrinks, but the code block has keeps it’s larger font.

---

<div class="post-metadata">

**Author:** ![amandam](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/amandam/32/79539_2.png) [@amandam](https://forum.wixstudio.com/u/amandam)\
**Post date:** [February 27, 2025, 5:38pm UTC](https://forum.wixstudio.com/t/wix-studio-how-to-format-text-as-code/68715/4 "2025-02-27T17:38:08Z")

</div>

Upon investigation it seems that Rich content does not rely on site styles. I am not personally sure if this is by design or a bug. If you would like to report the issue as a bug for investigation, you may do so here [Wix Studio - How to report a bug](https://forum.wixstudio.com/t/wix-studio-how-to-report-a-bug/51007)

Now - if you want to attempt a workaround in the meantime - you may be able to accomplish managing this font through media queries and css.

Alternatively, there may be solutions on the app market that will be easier to implement. I briefly searched and saw this one (untested by me) [Snippets | Wix App Market | Wix.com](https://www.wix.com/app-market/web-solution/snippets)
