initialized with the current state of the editor