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() { | |
// Adding upload button to Trix toolbar on initialization | |
document.addEventListener('trix-initialize', function(e) { | |
trix = e.target; | |
toolBar = trix.toolbarElement; | |
// Creation of the button | |
button = document.createElement("button"); | |
button.setAttribute("type", "button"); | |
button.setAttribute("class", "attach"); |