Simplified code that was checking span styles after the user typed. Just loop through all spans instead of checking for each individual class.