Drafts Action Directory

Select Current Line

Posted by @singleitemstore, Last updated: 2018-07-04 15:38:43 UTC
Install

Steps

  • script

    // Select Current Line
    
    var lineRange = editor.getSelectedLineRange();
    var eol = lineRange[0] + lineRange[1];
    
    if ( editor.getTextInRange( eol - 1, 1 ) === '\n' ) {
      eol = eol - 1;
    }
    
    editor.setSelectedRange( lineRange[0], eol - lineRange[0] );
    

Comments

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