Strip Line Feed

Posted by agiletortoise, Last update 30 days ago

Remove line feed characters in the selection.

Steps

  • script

    // rewrap selection removing any line feed characters
    
    const text = editor.getSelectedText();
    const [st, len] = editor.getSelectedRange();
    
    newText = text.split("\n").join(" ");
    
    editor.setSelectedText(newText);
    editor.setSelectedRange(st, newText.length);

Options

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