Adds a global function for generating excerpts of html by character or word count