Drafts Action Directory

Word-count of selection

Last update 3 months ago

Number of words currently selected in editor

Install

Steps

  • script

    (() => {
    
    	const main = () =>
    		alert(
    			words(editor.getSelectedText())
    			.length
    			.toString() + ' words in selection'
    		);
    	
    	// words :: String -> [String]
    	const words = s => s.split(/\s+/);
    
    	// MAIN ---
    	main();
    	
    })()

Options

  • After Success Default
    Notification Info
    Log Level Info

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.