Skip to main content
added 25 characters in body; edited title
Source Link

Is it possible to use <pre> / <code> preformatted text field within a LWC component HTML file?

I'm trying to display code as text, unrendered. However, when I use the <pre> or <code> tag with html tags within it, LWC is rendering what is inside the <pre> tagthose tags in the browser instead of ignoring and displaying as text, which is expectedwhat would normally happen. Is there any way around this?

Is it possible to use <pre> preformatted text field within a LWC component HTML file?

I'm trying to display code as text, unrendered. However, when I use the <pre> tag with html tags within it, LWC is rendering what is inside the <pre> tag in the browser instead of ignoring and displaying as text, which is expected. Is there any way around this?

Is it possible to use <pre> / <code> preformatted text field within a LWC component HTML file?

I'm trying to display code as text, unrendered. However, when I use the <pre> or <code> tag with html tags within it, LWC is rendering what is inside those tags in the browser instead of ignoring and displaying as text, which is what would normally happen. Is there any way around this?

Source Link

Is it possible to use <pre> preformatted text field within a LWC component HTML file?

I'm trying to display code as text, unrendered. However, when I use the <pre> tag with html tags within it, LWC is rendering what is inside the <pre> tag in the browser instead of ignoring and displaying as text, which is expected. Is there any way around this?