Please refer also the manual of the text function.

After closing the text dialog, choose the entity along which the text should be aligned. Adjust the options in the options toolbar if desired and click the position of the text.