Skip to main content

Add line breaks in text

You can add line breaks to shape and connector labels.

Press Shift+Enter or Alt+Enter as you type the label text to add a line break.

Add line breaks to shape and connector labels in draw.io

Open this example in our online editor

Line breaks are only possible with word wrapping enabled on shapes. Both are enabled by default.

Re-enable Word Wrap and Formatted Text

If one or both of these options are disabled in the Text tab of the format panel, renable both to be able to add line breaks to labels.
Enable Word Wrap and Formatted Text in the Text tab of the format panel to be able to add line breaks to shape and connector labels in draw.io

Word wrapping is also supported on labels converted to SVG.

Shape style definition

You can also edit the shape style XML definition to re-enable these two options on a selected shape or connector.

  1. Select the shape, then click Edit Style in the Style tab of the format panel.
  2. Add the style options: whiteSpace=wrap and html=1, as shown in the image below.
    Enable word wrapping and HTML labels in the style options to add line breaks to shapes if they had been deactivated

See all text style options for labels, list shapes and tables.