add byWord option to methods erase and typeIn