Added function to switch between hard and soft wrapping text