Copy and paste

Copies paste as items into any diagram, tab or window and as text into other apps, and you can paste JSON or Mermaid from anywhere.

Copy and paste items#

Press ⌘C / Ctrl+C to copy the selection, and ⌘V / Ctrl+V to paste it centered at your pointer, or in the middle of the view. The pasted items keep their grid alignment and are selected, and one undo removes the paste.

A copy includes:

  • the selected items, with their labels, styles and pricing settings,
  • everything inside the selected groups,
  • the arrows between copied items. Arrows attached to anything that isn't copied are left out.

Pasting into another diagram copies the image nodes' images, as long as you can open the diagram they came from. See Copying and moving images. With view-only access you can copy, but not paste.

Paste into other apps#

Pasted into another app, such as a chat, a document or a terminal, a copy gives the text of the copied items: every label and arrow label, one per line, from top to bottom and left to right. A copy without any text pastes nothing there. The items travel hidden in the copy, where only Lineout reads them, so to get JSON use the code panel's Copy JSON or export the page.

While you edit a label or have text selected in a panel, ⌘C copies that text as usual.

Paste JSON#

Click an empty spot on the canvas, so the paste doesn't land in a text field, and paste page JSON from anywhere: the code panel's Copy JSON, a file or a script.

{ "nodes": [], "arrows": [] }

Every pasted item gets a new id, so the same JSON can be pasted again and again. From a document with pages, only the first page is pasted. Anything that isn't valid diagram JSON pastes nothing. See Diagram format.

Paste Mermaid#

Paste a Mermaid flowchart, sequence, state or use case diagram, such as a mermaid code block from a README, and Lineout lays it out as shapes, groups and arrows. If it can't be read, a dialog shows the text with the line to fix, and Paste adds it once it's fixed. See Mermaid diagrams.

Paste images#

Paste a copied image or a screenshot to upload it as an image node. See Adding images.

Copy and Paste in the canvas menu and in ⌘K use the browser's clipboard API, which may ask for permission. Without it, Paste uses the last items you copied in this diagram. The keyboard shortcuts never need permission.