Action

Insert Clipboard and Newline

Posted by sylumer, Last update 23 days ago - Unlisted

Steps

  • script

    const [intSelStart, intSelLength] = editor.getSelectedRange();
    const strLeft = editor.getText().slice(0, intSelStart);
    const strRight = editor.getText().slice(intSelStart + intSelLength);
    const strAddition = app.getClipboard() + "\n";
    editor.setText(strLeft + strAddition + strRight);
    editor.setSelectedRange(strLeft.length + strAddition.length, 0);
    editor.activate();

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.