Files

10 lines
306 B
Vue
Raw Permalink Normal View History

<script setup lang="ts">
/** Renders editor text where "\n" means a line break */
const props = defineProps<{ text: string }>();
const lines = computed(() => props.text.split("\n"));
</script>
<template>
<template v-for="(line, i) in lines" :key="i"><br v-if="i > 0" />{{ line }}</template>
</template>