fix: pass uploadFunction prop

This commit is contained in:
Ritvik Sardana
2026-06-30 00:54:34 +05:30
parent f239bdaefd
commit f5db77a443
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -3,6 +3,7 @@
<FTextEditor
ref="e"
:extensions="[ComponentUtils, HandleExcelPaste, CleanStyles]"
:upload-function="uploadFunction"
v-bind="$attrs"
:editor-class="[
'prose-f max-h-64 max-w-none overflow-auto my-4 min-h-[5rem]',
@@ -72,6 +73,7 @@ import { computed, nextTick, ref } from "vue";
interface P {
modelValue: string;
autofocus?: boolean;
uploadFunction?: (file: any) => Promise<any>;
}
interface E {
@@ -86,7 +88,7 @@ const props = withDefaults(defineProps<P>(), {
defineEmits<E>();
const e = ref(null);
const editor = computed(() => e.value.editor);
const editor = computed(() => e.value?.editor);
const authStore = useAuthStore();
const fixedMenu = [
"Paragraph",
@@ -4,6 +4,7 @@
ref="e"
:model-value="content"
:placeholder="placeholder"
:upload-function="uploadFunction"
@update:model-value="$emit('update:content', $event)"
@clear="() => $emit('update:attachments', [])"
>
@@ -97,6 +98,7 @@ interface P {
placeholder: string;
attachments: File[];
expand?: boolean;
uploadFunction?: (file: any) => Promise<any>;
}
interface E {