Action

Strip Line Feed

Posted by agiletortoise, Last update about 5 years 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
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.