Action
Split Lines to New Drafts With Current Tags
Splits a line to new Drafts.
A new draft is created for every non-blank line, with that line as its content. Each new Drafts has the same tags as the original draft.
Steps
-
script
let intCounter = 0; draft.content.split("\n").forEach(function(strLine) { if (strLine.trim().length > 0 ) { let draftNew = new Draft; draftNew.content = strLine; draft.tags.forEach(function(strTag){draftNew.addTag(strTag);}); draftNew.update(); intCounter++; } }); app.displayInfoMessage(`${intCounter} drafts created.`);
Options
-
After Success Default Notification Error Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.