1 2 3 4 5 6 7 8 9 10 11
import * as Trix from "trix" import { AttachmentUpload } from "./attachment_upload" addEventListener("trix-attachment-add", event => { const { attachment, target } = event if (attachment.file) { const upload = new AttachmentUpload(attachment, target) upload.start() } })