vue-trix
vue-trix copied to clipboard
Why is that attachments /pictures are not displaying in my trix-editor
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
but in the editor it doesn't show up
Can you log the data inside form.complete_description
before and after the attachment event is fired?
which event here sir?
On both @trix-attachment-remove="handleAttachmentRemove" @trix-attachment-add="handleAttachmentAdd"
, could you see v-model changes?
like this ?
handleAttachmentRemove(file){
console.log(file);
handleAttachmentAdd(event){
console.log(event);
or maybe this one ?
@trix-initialize="handleTrixInit"
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
So, print out form.complete_description
and I would like to see what you saved?
where will I write it in mounted()
? form.complete_description?
When @trix-attachment-add
is trigged, let print out your form.complete_description
content?
it would look like this
@hanhdt
@abrhambas01 Sorry for late response.
Please, trace to image's src
and make sure it exists.
Yep already got it
Sir the issue came back, why is it like this ? it still show someting like
c
This is how it shows up in the vue devtools prop
Autem illo iure beat.asdasd klasjdas, askldja skldjdownload.jpg 2.44 KB"
should it give me a file name .. ?
anyone here who has made it show?
@abrhambas01 sorry, I have been busy lately. Did you resolve this issue?