How can I effectively use raw HTML code in webpage content?

How can I effectively use raw HTML code in webpage content?

NB1738
Tourist
3 0 1

I'd like to show source code (C, Python, etc.) on our pages and blogs.

I clicked the "Show HTML" button and enter HTML code in the rich text editor, but the code is modified ("<" is replaced to "&lt;", newline code is erased, and so on).

So, I cannot display as I typed although using <pre> tags.

 

(1) Do you have any idea to deactivate the function of code modification?

(2) Or, how can I make some sections to use raw HTML code in the pages?

Replies 4 (4)

Simonsron
Shopify Partner
699 87 123

Simonsron_0-1673255441256.png

When you use the rich text editor, if you need to paste the HTML source code, you first need to open the source switch.

 

banned
NB1738
Tourist
3 0 1

@Simonsron 

Thank you for your reply.

 

I use the "source switch" and edit the HTML directly.

Although I use the <pre> tags, the code I wrote was automatically modified.

For example, when I write a character of "<", it is modified to "&lt;".

I'd like to show it exactly as I wrote.

Cedcommerce
Shopify Partner
718 77 116

Hello @NB1738,

 

You can enter the tag directly in your content, without going to the HTML editor.

Cedcommerce_0-1673266248896.png

 

image.png

 

Hope it helps. Let us know if you need any help.

 

Regards, 

CedCommerce

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
NB1738
Tourist
3 0 1

@Cedcommerce 

Thank you for your reply.

 

I'd like to show some programs on the blogs or pages.

So, I'd like to use <pre> tags and show exactly as I type.

I do not want to show HTML tags.