functional cancel button for editor