Fixed paste issue for no HTML mode.
Improved button and highlighting visibility handling.