Inject HTML on rendered markdown and/or output subarea

14 views
Skip to first unread message

Kiko

unread,
Jun 13, 2019, 2:43:42 AM6/13/19
to jupyter
Hi all,

What would be the best way to capture the "<div>" with class
"text_cell_render" or "output_subarea" after cell execution to inject
some code?

For instance, if I have a markdown cell with code "Hi" I can see in
the browser inspector the following:

<div class="text_cell_render rendered_html" tabindex="-1"><p>Hi.</p></div>

I would like to capture the inner HTML ("<p>Hi.</p>") and return a
modified version automatically after the user executes the cell.

I can see that there are JS methods like .html() (somewhere in
outputArea) that could help me on this but I wonder if maybe there are
more direct and canonical ways to do so.

Thanks in advance.

Best.
Reply all
Reply to author
Forward
0 new messages