<template>
	<rich-text class="fe-chat-md" :nodes="nodes" user-select />
</template>

<script>
import { markdownToHtml } from '@/utils/markdown.js'

export default {
	name: 'FeChatMarkdown',
	props: {
		content: { type: String, default: '' }
	},
	computed: {
		nodes() {
			return markdownToHtml(this.content)
		}
	}
}
</script>

<style lang="scss" scoped>
.fe-chat-md {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}
</style>
