Answer
-
Click on the page with the text tool, and type some text
-
Draw a rectangle around it
-
Select both, and do Text > Flow into Frame
-
Highlight all the text with the Text tool, and click the Align Centre button along the top.
-
Using the Select and Transform tool (F1)*, reposition the text so that it’s centred.
That’s it really. You can type new text inside and it will be centred. You can group it, copy and paste more copies, and edit the text. It should stay centred in the middle. You can also resize the rectangle, if you need to fit more text in. Even mutli line text will work. If you don’t want to scale the stroke of the rectangle when you are resizing it, go into Edit > Preferences > Behaviour > Transforms, and deselect the “Scale stroke width” option
*Edit: In Inkscape 1.0.x the shortcut key is now s
Attribution
Source : Link , Question Author : Aim , Answer Author : Billy Kerr