Action

Straighten Quotes

Posted by agiletortoise, Last update 7 months ago

Convert smart (slanted) quotes to straight quotes.

Steps

  • script

    // change quote type
    let s = editor.getSelectedText();
    
    s = s.replace("“", "\"");
    s = s.replace("”", "\"");
    s = s.replace("‘", "'");
    s = s.replace("’", "'");
    
    editor.setSelectedText(s);

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.