Well done!
Also, it doesn't technically need to be a preamble. Markdeep works by appending similar code to the end, which is much more innocuous when viewing the file outside a browser or when its rendered by other software (e.g. on Github).
Thank you for highlighting this feature of Markdeep. I have now added this feature in TeXMe and MdMe too. We can now put the `<script>` tag to load TeXMe or MdMe at the end of content. Here is an example:
# Euler's Identity
In mathematics, **Euler's identity** is the equality
$$ e^{i \pi} + 1 = 0. $$
<script src="https://cdn.jsdelivr.net/npm/texme"></script>
However, like I have explained in another comment[1], this method of writing content requires the content to not have any HTML syntax errors, otherwise the output would be mangled. Markdeep has this limitation too. There is a 'Caveats' section[2] in the README now that discusses this in detail.The original method of writing content with a single line of HTML code at the beginning of the content does not have this limitation. But if the HTML code in the beginning feels distracting, we can now put the `<script>` tag in the end too.
For the kind of user input (e.g., code pasted verbatim) I was trying to handle, a preamble was technically necessary, at least a `<textarea>` start tag was necessary at the beginning of the document.
For more details about this, please see the comparison of TeXMe vs. Markdeep I have posted here: https://news.ycombinator.com/item?id=18314175