Created
September 12, 2021 02:46
-
-
Save emisjerry/7d4097da9cd20c73e953da1582ea1c53 to your computer and use it in GitHub Desktop.
Capture-format: test using QuickAdd inline javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```js quickadd | |
selection = window.getSelection(); | |
selText = selection.toString() | |
console.log("selection", selText); | |
const activeFile = this.app.workspace.getActiveFile(); | |
if (!activeFile) { | |
new Notice("No active file", 5000); | |
return; | |
} | |
console.log("active file=", activeFile); | |
new Notice("active file" + activeFile.name, 5000); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment