Paint markers use oil-based, permanent ink and are suitable for metal, glass, wood, and plastic.
Textile markers are water-based and are designed specifically for writing on clothing and fabrics, becoming permanent after thermal fixation (ironing).
After you have printed the fabric, let it dry and then iron the reverse side with an iron (no steam) for ~1 minute. This makes the ink resistant to washing.