Javascript not working on Free Text tool