New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert image to trix-editor through javascript #1055
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does anyone know how to insert attachment in trix editor with javascript ?,
The text was updated successfully, but these errors were encountered: