Closed eliselavy closed 2 years ago
Fixed on PR #399
In the jupyter notebooks, for security reasons the tag <script
is escaped: \x3Cscript
. In trusted notebooks, I guess it is replaced. Have a look at the implementation on the ArticleCellOutputs component, where I extracted the javascript code in htmlScript[2]
:
if (output.data['text/html'].some(d => d.indexOf('/script>'))) {
const htmlScript = output.data['text/html'].join('').match(/(?<=(\x3Cscript[^>]*>))([\s\S]*?)\x3C\/script>/m)
// ...
}
One article use the nx-altair library to display network visualisation : https://pypi.org/project/nx-altair/
Example here: https://github.com/jdh-observer/jdh002-VeaK58WBs82C/blob/main/article-notebook_def.ipynb
The output script are available in the: "text/html"