Adding event listeners to text blocks

I have configured a logic hook to add some HTML into a few text blocks. I now wanted to add some functionality to these HTML elements through event listeners and JS but i am unable to add any event listeners.
suitecrm version = 8.5.0

This is very likely caused by security filters, which remove any JavaScript or any active elements from HTML…