Added updateEditor function for opening scripts.