Action

Go to end of draft

Posted by @scripts4drafts, Last update about 1 year ago

[Basic script for @draftsapp] Move the cursor to a new line at the end of the current draft.

Steps

  • script

    let len = draft.content.length;
    // if needed, insert a new line at the end of draft
    if (!draft.content.endsWith('\n'))
      editor.setTextInRange(len, 0, '\n');
    else
      editor.setTextInRange(len, 0, '');
    // activate is not required if the action is launched via a keyboard button
    editor.activate();

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.