created the functions to enable/disable designMode