I’m really enjoying using
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=TeX-AMS_CHTML">
</script>
in markdown documents to render maths. However I really dislike how markdown handles images. Sometimes I want to just cut and paste something into a note. Formatted notes are great for this, but if I include the mathjax script in the header then when I save the formatted note the rendered maths is saved, overwriting the source code for the maths.
Is there either a clever way around this? Or could devonthink support including customs headers in formatted notes (as has also been requested for markdown) which exist outside of the source file?