Using customUI to show HTML & run javascript with forge UI

Hi all,
Today I learn a new way to develop a macro for confluence cloud by using forge UI. The following page Custom UI gives me a good example how to show the context in customized HTML. I copy and paste the code, deploy and install it, it works well.

In the same page, it states that “Using custom UI, you can define your own user interface using static resources, such as HTML, CSS, JavaScript, and images.” I think it does support javascript too. I am trying to use the following HTML that calls a third-party javascript to render some math formula

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>MathJax example</title>
  <script src=""></script>
  <script id="MathJax-script" async
  When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
  \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]

I try to save this page to a local HTML and run it in a browser, it works. But when I run the macro with index.html replaced with the above HTML, everything will be shown literally. I wonder if the customUI supports the external javascript or not

I think you will find the way to do it here: