0
Can HTML inside Python run external JS script?
https://code.sololearn.com/cKuQP2Q3dNn8/?ref=app I'm aware of how to print in SoloLearn a HTML page from a Python script with ``` import os ... os.system("touch file.png") ``` But in this case I try to run an external js library to transform the pre from markdown to html I saw in this code by ChillPill : https://code.sololearn.com/W1xmUHW5Asrc/?ref=app If I put/remove double quotes around `marked(text)` it slightly works Does anybody knows if there is a workaround?
4 Answers
+ 1
For this to work correctly:
https://code.sololearn.com/ceZpOVhdYy5w/?ref=app
This should work correctly:
https://code.sololearn.com/W03XsQx2JgFS/?ref=app
+ 1
There is something other problem let me figure out
0
Yes adding external js is possible.
In your case I believe, there is something error in javascript code.
0
AKSHAY🇮🇳 the js runs smoothly if I put double quote around the function call marked(text), meaning it replaces `asdfghjkl` with `marked(text)`
But removing the quote doesn't run the imported marked function from the external js script