store text direction in TextElement