vue-trix icon indicating copy to clipboard operation
vue-trix copied to clipboard

Why is that attachments /pictures are not displaying in my trix-editor

Open abrhambas01 opened this issue 4 years ago • 15 comments

This is in my template / vue file :

     <div class="flex inline-block w-full">
             <VueTrix class="editor1 w-full" inputId="editor1" @trix-change="handleEditorChange" @trix-attachment-remove="handleAttachmentRemove" @trix-attachment-add="handleAttachmentAdd" v-model="form.complete_description" />
            </div>

it displays the contents inside here

image

but in the editor it doesn't show up

image

abrhambas01 avatar Mar 20 '20 01:03 abrhambas01

Can you log the data inside form.complete_description before and after the attachment event is fired?

hanhdt avatar Mar 20 '20 05:03 hanhdt

which event here sir?

abrhambas01 avatar Mar 20 '20 05:03 abrhambas01

On both @trix-attachment-remove="handleAttachmentRemove" @trix-attachment-add="handleAttachmentAdd", could you see v-model changes?

hanhdt avatar Mar 20 '20 05:03 hanhdt

like this ?

handleAttachmentRemove(file){

	console.log(file);
handleAttachmentAdd(event){
			console.log(event);

or maybe this one ?

@trix-initialize="handleTrixInit"

abrhambas01 avatar Mar 20 '20 05:03 abrhambas01

how can I check it @hanhdt Ofcourse I can't trigger the handleAttachmentRemove function but the "@trix-attachment-add="handleAttachmentAdd". I can definitely do that

this is when I erase the file_name / the name of the file in the trix-editor. And replace / add it with new one then I remove the file

image

abrhambas01 avatar Mar 20 '20 06:03 abrhambas01

So, print out form.complete_description and I would like to see what you saved?

hanhdt avatar Mar 20 '20 06:03 hanhdt

where will I write it in mounted()? form.complete_description?

abrhambas01 avatar Mar 20 '20 06:03 abrhambas01

When @trix-attachment-add is trigged, let print out your form.complete_description content?

hanhdt avatar Mar 20 '20 10:03 hanhdt

it would look like this image

@hanhdt

abrhambas01 avatar Mar 20 '20 14:03 abrhambas01

@abrhambas01 Sorry for late response. Please, trace to image's src and make sure it exists.

hanhdt avatar Apr 03 '20 02:04 hanhdt

Yep already got it

abrhambas01 avatar Apr 03 '20 16:04 abrhambas01

Sir the issue came back, why is it like this ? it still show someting like

c image

This is how it shows up in the vue devtools prop

Autem illo iure beat.asdasd klasjdas, askldja skldjdownload.jpg 2.44 KB"

abrhambas01 avatar Apr 19 '20 14:04 abrhambas01

should it give me a file name .. ?

abrhambas01 avatar Apr 22 '20 02:04 abrhambas01

anyone here who has made it show?

abrhambas01 avatar Jun 08 '20 05:06 abrhambas01

@abrhambas01 sorry, I have been busy lately. Did you resolve this issue?

hanhdt avatar Jun 29 '21 08:06 hanhdt