Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Last active September 14, 2016 01:25
Show Gist options
  • Save ttscoff/6335152 to your computer and use it in GitHub Desktop.
Save ttscoff/6335152 to your computer and use it in GitHub Desktop.
Add this before the </body> tag in an nvALT template.html file for working [[note links]] in the preview.
<script>
window.onload = function(e){
var container = document.getElementById("wrapper");
container.innerHTML = container.innerHTML.replace(/\[\[(.*?)\]\]/g,"<a href='nvalt://find/$1'>$1</a>");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment