Added the edit mode and read-only mode.