add flexibility to text and memo rendering