From 214a840d8afb6d5b76eb79dbea4e93a230e97f00 Mon Sep 17 00:00:00 2001 From: Baghi330 Date: Sat, 14 Feb 2026 16:26:26 +0330 Subject: [PATCH] readOnly --- app/components/auto-import/TiptapEditor.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/components/auto-import/TiptapEditor.vue b/app/components/auto-import/TiptapEditor.vue index 1e95537..ef94e6e 100755 --- a/app/components/auto-import/TiptapEditor.vue +++ b/app/components/auto-import/TiptapEditor.vue @@ -12,15 +12,13 @@ :key="index" @click="btn.action(editor)" :class="{ 'is-active': btn.isActive ? btn.isActive(editor) : false }" - :disabled="btn.disabled ? !btn.disabled(editor) : false" + :disabled="readOnly || (btn.disabled ? btn.disabled(editor) : false)" :title="btn.title" > {{ btn.icon }} - - @@ -42,6 +40,10 @@ const props = defineProps({ type: Array, default: () => [], }, + readOnly: { + type: Boolean, + default: true, + }, }); const editor = ref(null); @@ -298,6 +300,7 @@ watch( ); onMounted(() => { editor.value = new Editor({ + editable: !props.readOnly, extensions: [ StarterKit, Underline, @@ -431,7 +434,7 @@ onBeforeUnmount(() => { .tiptap { font-family: - "Vazir", + "sahel", "Inter", -apple-system, BlinkMacSystemFont,