Quick Draft

Posted by agiletortoise, Last update almost 2 years ago

Prompt for text and optional tags, and create a new draft with that text.

Useful for capturing another draft quickly without having to leave the draft you are currently working on.


  • script

    // prompt for text and create a draft with the input
    let p = Prompt.create();
    p.title = "Quick Draft"
    p.addTextView("content", "Draft content", "", {
    	height: 160,
    	wantsFocus: true
    p.addTextField("tags", "Tags", "", {
    	autocapitalization: false,
    	placeholder: "optional tags"
    p.addButton("Create Draft");
    if ( {
    	let d = Draft.create();
    	d.content = p.fieldValues["content"];
    	let tagStr = p.fieldValues["tags"];
    	if (tagStr.length > 0) {
    		let tags = tagStr.split(",");
    		for (let tag of tags) {
    	console.log("Draft created");
    else {


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