From 1704a016b1b94de18db10cb79b9cec43559d05d0 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Thu, 16 Mar 2023 14:34:40 +0100 Subject: [PATCH] Add files via upload --- ...lder Note Core - Make Current Drawing a Folder.md | 9 +++++++++ ...der Note Core - Make Current Drawing a Folder.svg | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ea-scripts/Folder Note Core - Make Current Drawing a Folder.md create mode 100644 ea-scripts/Folder Note Core - Make Current Drawing a Folder.svg 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