Action

Extract Selection to Draft

Posted by nickcharlton, Last update over 3 years ago - Unlisted

Given a selection, creates a new Draft with the selected text and maintains the current set of tags.

Steps

  • script

    (() => {
      const main = () => {
        const text = editor.getSelectedText();
    
        let newDraft = Draft.create();
        newDraft.content = text;
        draft.tags.forEach((tag) => newDraft.addTag(tag));
        newDraft.update();
      };
    
      main();
    })();

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.