string to text for primary docs