2023-03-29 17:21:20 +02:00
|
|
|
<script lang="ts">
|
|
|
|
/**
|
|
|
|
* Given an HTML string, properly shows this
|
|
|
|
*/
|
|
|
|
|
|
|
|
export let src: string;
|
|
|
|
let htmlElem: HTMLElement;
|
|
|
|
$: {
|
2023-03-31 04:04:11 +02:00
|
|
|
if(htmlElem){
|
2023-03-29 17:21:20 +02:00
|
|
|
htmlElem.innerHTML = src
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if src !== undefined}
|
|
|
|
<span bind:this={htmlElem}></span>
|
|
|
|
{/if}
|
|
|
|
|