Forum Archive

Sending text from Drafts 4

theoriginalbudman

I've been working with the x-callback-ur scheme to try and send text from Drafts 4 to Editorial, but so far I've only succeeded in creating a blank file.

I've create the following as a Drafts 4 action: editorial://x-callback-url/open?root=new&selection=0

This invokes editorial but it opens with a new, blank file rather than opening the text created in Drafts 4.

What am I doing wrong here?

theoriginalbudman

I did a little more digging and came up with this line of code: editorial://new/[[title]].md?root=local&input=[[body]]

The parameters [[title]] and [[body]] are assigned by Drafts.

There's been some progress. Invoking this code as a Drafts action creates the new file in Editorial, but for some reason the input text is not being pushed over. So all this does is creates a blank file in Editorial.

Any suggestions?

omz

Try something like

editorial://new/[[title]].md?root=local&content=[[body]]
                                        ^^^^^^^

The input parameter is intended for workflows, and I just noticed that content is undocumented – sorry about that!

theoriginalbudman

Yes!

That was what I was looking for.

Thank you.

What else have you got hidden up your sleeve?