Replies: 3 comments 1 reply
-
You aren't providing it HTML. You're providing it a string to add as a text node. You need to not have the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ekwoka thanks for the speedy response. I don't totally follow you but I am trying. So when I then set that value on the div with x-html. Should I be doing some other modification on that value before using it in x-html? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Got it. Thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an API I am getting my x-data from. It all works great except for some HTML.
My HTML is coming from the API encoded. Example:
<div class="content-intro"><p><strong>
I am also nested inside two
<template x-for"">
's.If I use x-text is shows the same as the encoding above:
<div class="content-intro"><p><strong>
If I use x-html I get '
' printed on the page like in the screenshot
Basically its properly handle the HTML except its outputting it in a string.
How can I have it output as code so that the end user isn't seeing code?
Beta Was this translation helpful? Give feedback.
All reactions