Files
template-10490/components/Content.vue

42 lines
663 B
Vue

<template>
<MdPreview v-if="editor === 2" :id="id" :modelValue="data" />
<div v-else v-html="data"></div>
</template>
<script setup lang="ts">
import { MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/preview.css';
const props = withDefaults(
defineProps<{
data?: any;
editor?: number;
isMobile?: boolean;
}>(),
{}
);
const id = 'preview-only';
</script>
<style lang="scss">
.content {
overflow: hidden;
color: #333131;
}
.content p{
padding: 0;
line-height: 2.2rem;
//text-indent: 2rem;
}
.content img{
padding: 8px 0;
max-width: 100%;
height: auto;
}
.content video {
width: 100%;
height: auto;
}
</style>