10 lines
306 B
Vue
10 lines
306 B
Vue
<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>
|