edit mode logic for ContentEditLayer