Implement resize handler functionality. Fold EditorState into Editor.