diff --git a/ea-scripts/Folder Note Core - Make Current Drawing a Folder.md b/ea-scripts/Folder Note Core - Make Current Drawing a Folder.md new file mode 100644 index 0000000..1f6d9b0 --- /dev/null +++ b/ea-scripts/Folder Note Core - Make Current Drawing a Folder.md @@ -0,0 +1,9 @@ +/* +This script adds the `Folder Note Core: Make current document folder note` function to Excalidraw drawings. Running this script will convert the active Excalidraw drawing into a folder note. If you already have embedded images in your drawing, those attachments will not be moved when the folder note is created. You need to take care of those attachments separately, or convert the drawing to a folder note prior to adding the attachments. The script requires the [Folder Note Core](https://github.com/aidenlx/folder-note-core) plugin. + +```javascript*/ +const FNC = app.plugins.plugins['folder-note-core']?.resolver; +const file = ea.targetView.file; +if(!FNC) return; +if(!FNC.createFolderForNoteCheck(file)) return; +FNC.createFolderForNote(file); \ No newline at end of file diff --git a/ea-scripts/Folder Note Core - Make Current Drawing a Folder.svg b/ea-scripts/Folder Note Core - Make Current Drawing a Folder.svg new file mode 100644 index 0000000..4e5f3b7 --- /dev/null +++ b/ea-scripts/Folder Note Core - Make Current Drawing a Folder.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file