Created
April 23, 2018 21:18
-
-
Save derickfay/defb2046c01300c76b06533e7f500401 to your computer and use it in GitHub Desktop.
Broken prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See online documentation for examples | |
// http://getdrafts.com/scripting | |
var p = Prompt.create(); | |
p.title = ""; | |
p.message = ""; | |
p.addButton("Add to draft"); | |
p.addTextField("Enter text", "t",""); | |
var con = p.show(); | |
if (con) { | |
t = p.fieldValues("t") | |
} | |
else { | |
context.cancel(); | |
} | |
Editor.setSelectedText(t); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment