May 3, 2020
Basecamp's Trix text editor lets people upload their own files into the text they're writing, but maybe you don't want to deal with file uploads at the moment.
To disable file uploads, first remove the "file" button (it looks like a paperclip) using CSS:
trix-toolbar [data-trix-button-group="file-tools"] {
display: none;
}
This removes the button, but it doesn't stop people from dragging files in. For that, add this javascript that ignores file uploads whenever one is attempted:
document.addEventListener("trix-file-accept", event => {
event.preventDefault()
})
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!