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,