feat(documents): use toast-ui markdown rich editor

This commit is contained in:
Ruslan Bakiev
2026-02-23 15:23:58 +07:00
parent 7c019a6300
commit f716a0ea26
5 changed files with 1401 additions and 208 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref } from "vue";
import ContactCollaborativeEditor from "~~/app/components/ContactCollaborativeEditor.client.vue";
import MarkdownRichEditor from "~~/app/components/workspace/documents/MarkdownRichEditor.client.vue";
type DocumentSortOption = {
value: string;
@@ -179,11 +179,9 @@ onBeforeUnmount(() => {
</div>
<div class="mt-3 min-h-0 flex-1 overflow-y-auto">
<ContactCollaborativeEditor
<MarkdownRichEditor
:key="`doc-editor-${props.selectedDocument.id}`"
:model-value="props.selectedDocument.body"
:markdown="true"
:room="`crm-doc-${props.selectedDocument.id}`"
placeholder="Describe policy, steps, rules, and exceptions..."
@update:model-value="emit('update-selected-document-body', $event)"
/>