Action

Previous Marker

Posted by agiletortoise, Last update over 4 years ago

Navigate to the previous navigation marker in the editor, if available.

Navigation markers are defined by the syntax used in the draft, and are the same as the navigation markers in the Navigate menu.

Steps

  • script

    let [st, len] = editor.getSelectedRange();
    let marker = editor.navigationMarkerBefore(st);
    
    if (marker) {
    	editor.activate();
    	editor.setSelectedRange(marker.location, 0);
    }
    else {
    	app.displayInfoMessage("No marker found");
    }

Options

  • After Success Nothing
    Notification None
    Log Level None
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.