Action

Condense Multiple Line Feeds

Posted by agiletortoise, Last update 4 months 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.