Surprising absence of append to clipboard action or even shortcut

A single unique copy to clipboard action or shortcut is very limiting because it assumes that the user wants to copy a contiguous block of text.

On my Mac for example I very frequently use the append to clipboard function which comes with launchbar and many other apps.

The absence of an append to clipboard function in both drafts actions and shortcuts suggest that it is an iOS limitation. Is my assumption correct?

There are workarounds such as multiple copies to a clipboard manager like copied and merge in the clipboard manager but these are time consuming

Another workaround is append prepend to draft and copy final draft to clipboard but that is also time consuming

Thank you for your time and help

There is an Append to Clipboard action Greg posted over a year ago to the Action Directory.

Is that the sort of thing you are after? If not can you describe the precise behaviour you are seeking? Perhaps with an example?

1 Like

I am sorry. I did not express myself clearly.

I said clipboard but a new draft would be even better.

As you suggest, it’s better to give an example

A drafts user is reading a long text. He wants to be able to sequentially highlight parts of the long text and after each highlight append to either the clipboard or to a even new draft BUT of

I know that it is currently possible to spend to a new draft but the procedure requires to many steps to always append to the same draft

I’m pretty sure that you can use Shortcuts shortcuts to do what you are describing by sharing the selection to the specific shortcut via the share sheet.

Append to a specific draft (specified by UUID).

Append to clipboard.

Do they do what you are thinking of?

1 Like

Thank you very much. I will work on it and report back

I’m taking small steps one at a time
The following works nicely sending highlighted text to a unique draft called clipdraft . Before I create a duplicate with prepend I have a small problem to fix.
When I am in apple mail for example and I highlight text and run the shortcut, i end up in the drafts app, in the draft called clipdraft where the text was pasted which is not what I want. I just want to continue working in the email which I was reading
This is surprising because the edit in draft switch is set to off as per the shortcut snapshot below

I would like us make multiple variants of the drafts action script below

If you have the time and patience, what do I edit to

  1. Append to a unique draft with a uuid

  2. Prepend Instead of of append

  3. Action applies to highlighted text with a draft and if no text is highlighted, applies to entire draft

Thank you very much. Please do not hesitate to say that I am asking too much and taking up too much of your time

let f = () => {
// select an existing draft
let d = app.selectDraft();
if (!d) {
return false;
}
d.content = d.content + “\n” + draft.content;
d.update();
return true;
}
if (!f()) {
context.cancel();
}

The Shortcuts append action does look to be somewhat broken with the edit option. But using the x-callback-url action with the details available on the Drafts URL scheme page seems to work as expected and loop back to Shortcuts.

For your follow-up questions:

1. Append to a unique draft with a uuid

Take a look at the class level function “find” on the Draft Object documentation page. Think about using that instead of the app level “selectDraft”.

2. Prepend Instead of of append

If

d.content = d.content + “\n” + draft.content;

Appends the content of the current draft to the destination draft, what would changing the order in that line, like this do to the content of the destination draft?

d.content = draft.content + “\n” + d.content;

3. Action applies to highlighted text with a draft and if no text is highlighted, applies to entire draft

Take a look at the Editor object documentation. You can get all text and get selected text if you have a read of the options available.

That should point you in the right direction.

1 Like

thank you very much. I look forward to reading up and creating the actions.
Thanks for a very well structured response. I appreciate the fact that it is time consuming to insert links in your messages.