2023-07-12 05:57:32 +02:00
|
|
|
<template>
|
2023-09-29 13:30:13 +02:00
|
|
|
<div class="rounded-lg border border-slate-200 dark:border-slate-700 p-6 mfm-root mb-4 relative overflow-hidden">
|
2023-07-15 10:32:48 +02:00
|
|
|
<div class="absolute top-0 left-0 px-1 py-0.5 text-xs bg-slate-200 dark:bg-slate-800 rounded-br-lg z-20">{{ $t('_content.preview') }}</div>
|
2023-09-26 14:57:26 +02:00
|
|
|
<div class="ignore" :class="$style.mfmRoot">
|
2024-01-26 09:08:20 +01:00
|
|
|
<MkMfm :text="realText" baseHost="misskey.io" />
|
2023-09-26 14:57:26 +02:00
|
|
|
</div>
|
2023-07-12 05:57:32 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import MkMfm from '@/components/mk/Mfm';
|
|
|
|
|
2024-01-26 09:08:20 +01:00
|
|
|
const props = defineProps<{
|
2023-07-12 05:57:32 +02:00
|
|
|
text: string;
|
|
|
|
}>();
|
2024-01-26 09:08:20 +01:00
|
|
|
|
|
|
|
const realText = computed(() => props.text.replace(/\\[\s]*$/gm, '\n'));
|
2023-07-12 05:57:32 +02:00
|
|
|
</script>
|
2023-09-26 14:57:26 +02:00
|
|
|
|
|
|
|
<style module>
|
|
|
|
.mfmRoot img {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
</style>
|