Open adiubaidah opened 1 year ago
Hey, have you found a solution to this?
Have you tried?
new Trix.Attachment({content : url, contentType:"image"})
function addImageUrl(url, caption) {
const attachment = new Trix.Attachment({ filename: caption, url: url, contentType: "image/png" })
element.editor.insertAttachment(attachment)
}
this worked for me.
Does anyone know how to insert attachment in trix editor with javascript ?,