add codes for editor