I have tried rendering the html by storing the html in a variable but it is not working , I also tried the triple curly braces
<script>
let name = 'world';
let val = ""
let ans2 = ""
let ans3;
import showdown from 'showdown';
import validity from 'validity-checker';
function dataSubmit(e){
e.preventDefault();
//ans = validity.isEmoji("ggg");
ans2 = new showdown.Converter();
ans3 = ans2.makeHtml(val)
}
</script>
<div>
<textarea bind:value={val} on:change={dataSubmit}></textarea>
<div>
{{{ans3}}}
</div>
</div>
Return type of the ans3 variable is like "<h1>Hello</h1>"