Apologies for this probably basic js/ts question, but I’m struggling to find an answer anywhere.
I’m working on a plugin to generate Things to-do items from selected text. How can I fetch/open/execute the Things URL from within the plugin?
i.e. I can generate the URL Scheme below
'things:///json?data=[{"type":"to-do","operation":"create","attributes":{"title":"Newtodo"}}]'
but I can’t get either xHttpRequest() or fetch() to work. Obviously clicking the link works, but I’d like to do this automatically.
I have struggled with this before. I forget the exact answer, but I believe it has to do with:
and note the comment:
To open a new window on every call of window.open()
, use the special value _blank
for windowName
.
Sweet! That worked perfectly with no tweaks, thanks!
I just need to figure out whether this method lets me receive a response back in Obsidian so I can get the to-do id from Things
1 Like