Commit fb094320 authored by Romain Casati's avatar Romain Casati
Browse files

Special display type for PythonTutor.

parent f8d2cba1
...@@ -104,9 +104,9 @@ def tutor(**kwargs): ...@@ -104,9 +104,9 @@ def tutor(**kwargs):
json_trace=trace, json_trace=trace,
extern_tutor_url=js.Basthon.basthonModulesRoot() + '/extern', extern_tutor_url=js.Basthon.basthonModulesRoot() + '/extern',
iframe_id=id) iframe_id=id)
iframe = f'<div style="width: 100%; height: 100%; overflow: auto;"><iframe id="{id}" style="width: 100%; height: 400px;" frameborder="0" src="data:text/html;charset=utf-8,{quote(iframe)}"></iframe></div>' iframe = f'<iframe id="{id}" style="width: 100%; height: 400px;" frameborder="0" src="data:text/html;charset=utf-8,{quote(iframe)}"></iframe>'
# sending node to Basthon for rendering # sending node to Basthon for rendering
kernel.display_event({"display_type": "html", kernel.display_event({"display_type": "tutor",
"content": iframe, "content": iframe,
"iframe-id": id}) "iframe-id": id})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment