Can HTML inside Python run external JS script? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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?

12th Sep 2021, 5:51 PM
tebkanlo
tebkanlo - avatar
4 Answers
14th Sep 2021, 3:15 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
There is something other problem let me figure out
14th Sep 2021, 3:30 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
Yes adding external js is possible. In your case I believe, there is something error in javascript code.
13th Sep 2021, 7:46 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
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
13th Sep 2021, 10:41 AM
tebkanlo
tebkanlo - avatar