Action
Explode Draft
Steps
-
script
let strTag = promptForTag(); let astrLines = draft.content.split("\n"); astrLines.map(processLine); function processLine(p_strText) { let draftNew = Draft.create(); draftNew.content = p_strText; if (strTag.length > 0) draftNew.addTag(strTag); draftNew.update(); } function promptForTag() { const buttonOK = "OK"; let promptText = Prompt.create(); promptText.title = "Enter Tag"; promptText.addTextField("textFieldName", "Tags", "", { "wantsFocus": true }); promptText.addButton(buttonOK); if (promptText.show()) { if (promptText.buttonPressed == buttonOK) { return promptText.fieldValues["textFieldName"]; } } return ""; }
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.