late 14c., "wording of anything written," from Old French texte, Old North French tixte "text, book; Gospels" (12c.), from Medieval Latin textus "the Scriptures, text, treatise," in Late Latin "written account, content, characters used in a document," from Latin textus "style or texture of a work," literally "thing woven," from past participle stem of texere "to weave, to join, fit together, braid, interweave, construct, fabricate, build," from PIE root *teks- "to weave, to fabricate, to make; make wicker or wattle framework."
An ancient metaphor: thought is a thread, and the raconteur is a spinner of yarns — but the true storyteller, the poet, is a weaver. The scribes made this old and audible abstraction into a new and visible fact. After long practice, their work took on such an even, flexible texture that they called the written page a textus, which means cloth. [Robert Bringhurst, "The Elements of Typographic Style"]
Meaning "a digital text message" is from 2005.