Merge text into a template