# Diagram code templates Nobody remembers the syntax for a language they use twice a year. The template button loads a working example for whichever language you have selected, which you then edit into what you wanted. It is the quickest route into an unfamiliar language, and it is genuinely how most people should start. ![image-20260907-090200.png](https://help.gocapable.com/images/4611f26b-9d6d-45ac-98db-982e11bcede5.webp) --- ## What this is for * Starting a diagram in a language you do not use often. * Learning a new language by editing a working example. * Getting past the blank page. --- ## How it works ![A grid of Mermaid starter templates with preview thumbnails, including user journey, state, flowchart, sequence, class, entity relationship, gantt, pie, mindmap, quadrant, git graph, XY chart, block a](https://help.gocapable.com/images/3bb5b7e1-d4e1-46f6-9dd4-dc7ae7f54bf4.webp) Each starter carries a thumbnail of what it produces, so you can choose the shape of the diagram before writing any syntax. | **Action** | **How** | | --------------------- | ----------------------------------------------------------------------------- | | Load a template | The template option in the editor toolbar. | | Per language | The template matches the language you have selected. | | Editing | Replace the example content with yours; the structure is already correct. | | Replacing your source | Loading a template replaces what is there, so copy anything you want to keep. | --- ## A few things that catch people out * Loading a template replaces the current source. Copy first if you have written anything. * Templates are starting points, not house style. Nothing stops you deleting all of it. * The language reference pages have longer worked examples. See [Reference](https://help.gocapable.com/diagrams/reference.html). --- ## Related [Import diagram source from a fileBringing in source you already have.](https://help.gocapable.com/diagrams/import-diagram-source-from-a-file.html) [Generate diagram code with AIA draft, written into the code pane.](https://help.gocapable.com/diagrams/generate-diagram-code-with-ai.html) [Text editorBack to the editor overview.](https://help.gocapable.com/diagrams/text-editor.html) --- _The source is right there. Read it._