Text this: Integrating all-optical switching with spintronics