Action

Save images in Drafts' Previews folder

Posted by sorashima, Last update 8 months ago

UPDATES

8 months ago

Translate Shortcuts error message to English.

show all updates...

8 months ago

Translate Shortcuts error message to English.

8 months ago

The Drafts action directory automatically inserts its own URL at the beginning of the markdown link, so you had to manually remove it after copying the shortcut URL. Fixed it.

8 months ago

The Drafts action directory automatically inserts its own URL at the beginning of the link, so replaced the shortcut URL with plaintext instead of the link format.

10 months ago

Changed the discription.

10 months ago

Rename this action

Save images in Drafts’ Previews folder

This Drafts action + shortcut does the following:

  1. Let the user select the image files and save them in the Drafts Previews folder (iCloud Drive / Drafts / Library / Previews /).
  2. Insert those image links into the draft.

Shortcut:

https://www.icloud.com/shortcuts/5a476c521a2f47a5b5da90517e49a1ae


Example of use


When this action is executed, the photo selection screen is displayed. Try selecting two photos. Then tap the “Add” button.


Links to image files have been inserted in the draft being edited.

1
When you open the file app, you can see that the image files are saved in the Previews folder of the Drafts app.


When you perform an action such as “Markdown Preview-BASIC”, the images are displayed.


Initial setting


Tap here for this action on the shortcut.


Create a Previews subfolder in the Library subfolder of iCloud Drive’s Drafts folder, select it and click Done.


https://sorashima.hatenablog.com/entry/ObsidianImagePreviewOnDrafts

Steps

  • runShortcut (iOS only)

    shortcutName
    StoreImgsInPreviewsFolder
    waitForResponse
    true
  • insertText (iOS only)

    template
    [[shortcut_result]]

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.