mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 16:35:57 +08:00
Added auto copy share link to clipboard
This commit is contained in:
17
README.md
17
README.md
@@ -11,6 +11,16 @@ Share obsidian files to Notion with one click, and auto add Notion share link in
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
# Todo
|
||||||
|
|
||||||
|
- [x] support for custom page banner
|
||||||
|
- [x] update the exsit page
|
||||||
|
- [x] support for mult language
|
||||||
|
- [x] support for auto copy the share link to clipboard
|
||||||
|
- [ ] support for mobile
|
||||||
|
- [ ] transfer the bi-link format like [[]] into the format that Notion supports.
|
||||||
|
|
||||||
|
|
||||||
# How to use
|
# How to use
|
||||||
## Install the plugin
|
## Install the plugin
|
||||||
### BRAT
|
### BRAT
|
||||||
@@ -62,14 +72,7 @@ A share link will be automatically generated after successful upload
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
# Todo
|
|
||||||
|
|
||||||
- [ ] support for mobile
|
|
||||||
- [x] support for custom page banner
|
|
||||||
- [ ] update the exsit page
|
|
||||||
- [ ] transfer the bi-link format like [[]] into the format that Notion supports.
|
|
||||||
- [ ] support for mult language
|
|
||||||
- [ ] support for auto copy the share link to clipboard
|
|
||||||
|
|
||||||
# Buy me a cup of coffee.
|
# Buy me a cup of coffee.
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export class Upload2Notion {
|
|||||||
}
|
}
|
||||||
console.log(res,'===')
|
console.log(res,'===')
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.updateYamlInfo(markdown, fullPath, res)
|
await this.updateYamlInfo(markdown, fullPath, res)
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
@@ -102,6 +102,7 @@ export class Upload2Notion {
|
|||||||
const yamlObj:any = yamlFrontMatter.loadFront(yamlContent);
|
const yamlObj:any = yamlFrontMatter.loadFront(yamlContent);
|
||||||
const {url, id} = res.json
|
const {url, id} = res.json
|
||||||
yamlObj.link = url;
|
yamlObj.link = url;
|
||||||
|
await navigator.clipboard.writeText(url)
|
||||||
yamlObj.notionID = id;
|
yamlObj.notionID = id;
|
||||||
const __content = yamlObj.__content;
|
const __content = yamlObj.__content;
|
||||||
delete yamlObj.__content
|
delete yamlObj.__content
|
||||||
|
|||||||
3
main.ts
3
main.ts
@@ -45,9 +45,6 @@ export default class MyPlugin extends Plugin {
|
|||||||
"Share to notion",
|
"Share to notion",
|
||||||
async (evt: MouseEvent) => {
|
async (evt: MouseEvent) => {
|
||||||
// Called when the user clicks the icon.
|
// Called when the user clicks the icon.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.upload();
|
this.upload();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user