ChatMessageContent.vue 438 B

123456789101112131415
  1. <template>
  2. <!-- eslint-disable-next-line vue/no-v-html -- `html` já vem sanitizado por DOMPurify em renderMarkdown() -->
  3. <div class="prose-content" v-html="html" />
  4. </template>
  5. <script setup>
  6. import { computed } from "vue";
  7. import { renderMarkdown } from "../utils/markdownRenderer.js";
  8. const props = defineProps({
  9. content: { type: String, default: "" }
  10. });
  11. const html = computed(() => renderMarkdown(props.content));
  12. </script>