In this case I’m copying code snippets from Joplin which contains this information
<div class="joplin-editable" style="color: rgb(248, 248, 242); font-family: Avenir, Arial, sans-serif; font-size: 15px; font-style: normal; font-weight: 400; text-align: left; text-indent: 0px; white-space: normal; background-color: rgb(40, 42, 54);"><pre class="hljs" style="font-family: monospace, monospace; font-size: 1em; display: block; overflow-x: auto; padding: 0.5em; color: rgb(171, 178, 191); background: rgb(40, 44, 52);"><code style="white-space: pre-wrap !important;">$<span class="hljs-keyword" style="color: rgb(249, 38, 114);">some</span> = <span class="hljs-string" style="color: rgb(152, 195, 121);">"thing"</span> . <span class="hljs-string" style="color: rgb(152, 195, 121);">"beautiful"</span> ;</code></pre></div>
I’ve been doing this for some time now and was amazed how easily it was to add perfectly well syntax highlighted code into my notes by copy/paste from Joplin.
It stopped (I think in 2.1.42). Now only the <code> and <pre> tags are preserved and all those nice <span> tags are gone.
I’d really like to have this behaviour back in the app (as an option?).
. Many websites offer a nightmode (or darkmode) with plenty of colors as do code editors with syntax highlighting.