Drafts Action Directory

Word-count of selection

Last updated: 2018-05-27 15:46:18 UTC

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();
    	
    })()
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.