Action

Arrange

Posted by agiletortoise, Last update over 3 years ago

Trigger arrange mode. If a section of text is selected, arrange only that selection, otherwise arrange the full draft text.

Steps

  • script

    let [st, len] = editor.getSelectedRange();
    // check if selection exists, otherwise expand to whole text...
    if (len == 0) {
    	st = 0;
    	len = editor.getText().length;
    }
    
    let text = editor.getTextInRange(st, len);
    let newText = editor.arrange(text);
    editor.setTextInRange(st, len, newText);
    

Options

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