For now, I can only help with the structure of the Templater code. I cannot make time to look into all relevant character encodings or if they need double encoding, or ask about your operating system for treatment of slashes in the path, I’m afraid.
So your Templater script you can bind a hotkey to can look like this:
<%*
clipboard = (await tp.system.clipboard());
clipboard = clipboard.replace(/\s-\s/gm, " – ");
tR += clipboard;
_%>
In my trimmed example the clipboard = clipboard.replace(/\s-\s/gi, " – ");
replaces dashes to n-dashes (when a dash is not a hyphen).
You’ll need to populate all your rules here. The stupidest ChatGPT bot can help with this. Just make sure you prompt it with your exact requirements (specify OS for correct path).
Feed it this snippet as well so the bots knows what to build its answers around.
When you fire the script, the changed content gets pasted in the editor with tR +=
.
Also, there’s a great post about external links: