Confinement of knotted polymers in a slit