Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Roam42 is a prerequisite for this code, as it uses Roam42 libraries
// Install & Config:
// Add the code in this gist to a roam/js block in your roam graph and enable it
// change the text between quotes "" where it says let txt = "....."
// You can change the custom keys where it says hotkeys('ctrl+shift+7)
// this uses the hotkeys library, so explore more key combinations at:
// after changing the text below, you may have to refresh Roam for it to take effect.
Mousetrap.bind('ctrl+shift+7', function(event, handler) {
let txt = "{{[[TODO]]}} #action "
if (event.srcElement.localName == "textarea") {
roam42.common.setEmptyNodeValue(document.getElementById(, txt + event.srcElement.innerHTML )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment