Drafts Action Directory

Trim

Posted by latca, Last update 22 days ago

Trims white space from the beginning and end of each line in the draft.

Install

Steps

  • script

    var content = draft.content;
    var lines = content.split('\n');
    var numLines = lines.length;
    var out = [];
    for (var i=0; i<numLines; i++) {
    	out.push(lines[i].trim());
    }
    draft.content = out.join('\n');
    draft.update;

Options

  • After Success Default
    Notification Info
    Log Level Info

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.