HTML macros in Notebooks?

I am using Jupyter notebooks for electronic assignments in my college-level courses. When I receive the students’ notebooks, I edit/grade them in JupyterHub, adding comments and suggestions in red, using the HTML tags <font color=red> red text goes here </font>. It gets annoying having to enter those fairly long strings at the beginning and end of every comment, so I’m wondering whether there is way to accomplish something similar with less effort; e.g., by defining a macro. I suspect there is not, but thought I’d ask just to be sure.

I don’t know if there is an extension yet that allows you to define macros in Jupyter, but if software that runs in your OS will work, I would recommend espanso. It’s free, easily configurable, and works great.

1 Like

Espanso works perfectly for this – thanks!

1 Like