Insert from text to create various types of diagrams
Several features in our diagram editor let you create diagrams automatically from simple text statements.
Click on Arrange > Insert > Advanced to find the text entry features. Alternatively, click the + icon in the toolbar, then select Advanced.

The text insert features include:
- From Text: Create diagrams of various types or add entities containing lists from a text description. These are described below.
- PlantUML: Describe UML diagrams in the PlantUML syntax. You can also insert Mermaid text to generate UML and other diagrams.
- SQL: Add database entities to your diagram by inserting SQL code.
- CSV: Create flow charts, tree diagrams and more from comma delimited CSV data and some custom styling code.
The dialog that appears when you select one of these features contains sample text to give you an idea of how to use each feature and format the text for the particular diagram type you have chosen.
Create a diagram from text
When you insert a diagram from text, choose the type of diagram from the drop-down list at the bottom of the dialog. Each type of diagram has its own example text.

When you add one of these diagram types to the drawing canvas, it will be placed inside a layout container. By default, the Editable checkbox is enabled so you can re-edit the diagram as text.
- Drag the arrows in the top left or the frame of the layout container to move it around on the drawing canvas.
- Click on the pencil icon in the top left of the container to re-edit the text and update the diagram.

Changes that you make to the diagram inside the layout container will be reflected in the text and vice versa.
Note: To place the diagram onto the drawing canvas without the layout container, deselect the Editable checkbox when you insert from text. You will not be able to re-edit the text of this diagram.
Types of diagrams from text
The types of diagram you can insert via text in this dialog include:
- List - Entities for an entity relationship diagram to describe a database. Draw connectors manually to indicate relationship types.
- Diagram - a directed graph or a flowchart with shapes randomly placed.
- Circle - a directed graph with the shapes arranged in a circle.
- Horizontal Flow and Vertical Flow - Flowcharts automatically arranged horizontally or vertically.
- Vertical Tree and Horizontal Tree - A tree layout with vertical or horizontal branches and orthogonal connectors.
- Radial Tree - A tree with branches arranged around the central root node and straight connectors.
- Balloon Tree - A mindmap tree layout with child nodes arranged in an arc around parent nodes, and connectors without arrows.
- Mindmap - A mindmap layout with stacked leaf topics connected to their subtopics on the side away from the root node. Connectors do not have arrows.
Each type of diagram uses its own text formatting to set the connections, labels and layout of the diagram. See the example text for each diagram type and follow that style when describing your own diagram content.
Example: Flowcharts
The text used to define these diagrams is simple - a shape label, followed by an arrow -> to represent a connector, followed by another shape label. Each connected pair is on its own line, with an optional label in between. Be careful to remove any extra spaces before and after the arrows.
Coffee machine broken?->Check power
Check power->Plug in or turn on power
Check power->power OK->Check beans
Check beans->Refill hopper
Check beans->beans full->Check water
Check water->Refill tank
Check water->water full->Send for repair
When you edit the text of a diagram you have styled, it will retain the styles of the existing shapes and connectors and update their labels.

Example: Entities
Entities are formatted slightly differently. Top-level nodes are used as the heading text, and each entity is separated from the next by a blank line. Each text line under an entity heading is a line in the list, and the -- double dash adds a new section to the list.

Advertising
- Communication
- Marketing
- Embassy
- Organization
Marketing
- Segmentation
- Instruments
- Aims
--
+ testing
Communication
- PR
- Sponsoring
- Media
- Events
--
+ customer outreach
+ advertising
+ event coordination
You can then connect and rearrange these entities to show more clearly how they are related. The layout container will expand around the repositioned entities. When you edit the text again, the entity positions and their connectors are retained.
Learn more about drawing entity relationship diagrams
Example: Trees
These diagrams are formatted using indentation to indicate child-parent relationships. Write one line per shape. You don't have to indicate directions as the connectors will be drawn automatically between parent and child shapes.
Living Beings
Mammal
Dog
Cat
Bird
Owl
Fish

- Lines without indentation are root shapes. Several root shapes will draw several trees next to each other.
- Empty lines are ignored. Type
""to add a shape without a label. - The order of the lines is the order of the shapes in the layout. In vertical, horizontal and radial trees, the layout places several trees itself, so their order can differ from the order of the lines.
Example: Mindmap
Mindmaps are formatted as an indented outline where the level of indentation indicates the relationship between topics and their subtopics.
Advertising
Organization
Content
Budget
Analysis
Communication
PR
Sponsoring
Media
Events
Marketing
Segmentation
Instruments
Aims
Embassy
Layout
Appeal
Theories
Apply a different layout
If you don't like this layout, you can apply a different layout to the container.
- Select Arrange > Layout and choose the layout you want to use.
- Change the spacing and other layout settings to suit, and click Apply.
For example, applying a radial tree layout to this mindmap uses the same shapes with their collapse/expand icons but rearranges the diagram.

The diagram inside the layout container will be rearranged. New shapes you add to the container or when you edit the text will follow this newly applied layout.
Edit the text of an existing layout container
When you update the text of a layout container, it counts as a single editing step that you can undo.
- Change a line of text to change the label of its shape. The shape retains its style and size.
- Add a new line to add a shape with the style of a sibling and attach a connector to the parent shape.
- Delete a line to delete its shape and its connectors. If a deleted shape is collapsed, all hidden shapes under it are deleted too.
- Move a line to change the order of the shapes under the same parent shape. A line that you move to another parent shape becomes a new shape with the style of its new siblings. Manually copy the style of the old shape with Copy Style and Paste Style if you want it to retain its old style.
Formatting in labels: When you have added formatting to a label with bold, links, and so on, if you change the text in the text editor as described above, the label will lose this formatting and the label content will be replaced with the new text.
The text dialog will only list the shapes that you can see on the drawing canvas. Expand all collapsed shapes first to edit the text of their child shapes.
Related
- See all of the elements you can insert into your diagram.
- Learn more about applying layouts.
- Learn more about the balloon tree layout, mindmap layout and other tree layouts.
- You can also insert a Mermaid diagram from text.