Created
September 16, 2023 19:47
-
-
Save gregszero/88bee4512956fd182bd87ccf03270dcc to your computer and use it in GitHub Desktop.
Disable File Attachment on Trix Editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
addEventListener("trix-initialize", function(e) { | |
const file_tools = document.querySelector(".trix-button-group--file-tools"); | |
file_tools.remove(); | |
}) | |
addEventListener("trix-file-accept", function(e) { | |
e.preventDefault(); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment