PEE/src/Components/TextEmbeddings.svelte

25 lines
485 B
Svelte
Raw Normal View History

2022-04-12 23:56:18 +00:00
<script lang="ts">
import type { EmbeddedFile } from "../main";
import sanLink from 'linkify-string'
2022-04-12 23:56:18 +00:00
export let files: EmbeddedFile[];
let contents = files.map((e) => (e.data as Buffer).toString());
</script>
{#each contents as content}
<div class="additionnal">
{@html sanLink(content)}
2022-04-12 23:56:18 +00:00
</div>
{/each}
<style scoped>
.additionnal {
border-top: 2px dashed;
clear: both;
margin-top: 10px;
padding-top: 10px;
white-space: pre-wrap;
2022-04-12 23:56:18 +00:00
}
</style>