Hoist line to top

Posted by derick, Last update about 6 years ago

Move current line to the top of the document


  • script

    // See online documentation for examples
    // adapted from
    range = editor.getSelectedLineRange();
    line = editor.getTextInRange(range[0], range[1]);
    if (range[0] > 0) {
    	editor.setTextInRange(range[0] - 1, range[1], "");
    	editor.setTextInRange(0, 0, line);


  • 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.