Action

Trim Whitespace

Posted by agiletortoise, Last update 6 months ago

Remove whitespace characters (spaces, tabs, line feeds) at beginning and end of selection.

Steps

  • script

    // trim whitespace from selection
    
    const text = editor.getSelectedText();
    editor.setSelectedText(text.trim());
    

Options

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