partial implementation of Text tool