using localStorage to persist current editor state