Action

Condense Multiple Line Feeds

Posted by agiletortoise, Last update about 4 years ago

Replace any occurences of multiple line feeds (\n) in the editor with a single line feed.

Steps

  • script

    let text = editor.getText();
    text = text.replace(/\n+/g, "\n");
    editor.setText(text);

Options

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