Render page resources (image,js,css,cdn) in Confluence HTML Macro but with limited scop

I use the HTML Macro to add some decent visualized object and JavaScript.
As I added Bootstrap script files

  <script src=""></script>
  <script src=""></script>

what makes the standard Confluence buttons not usable.
Any chance to limit the scope of the above-mentioned scripts to render only a dedicated section of my HTML?

I found Limiting scope of JavaScript source, could that be a solution?
I haven’t got it to work yet :frowning: .