Import from eraser.io

The code panel accepts eraser.io diagram code as a one-shot import. Pasted text that smells like eraser gets a Convert hint; converting rewrites it into this language, and drawing proceeds through the normal compiler. Eraser is an import format; Koboyo diagram code is the editing format.

Family detection#

Eraser code carries no header, so the transpiler detects the family from the text:

  • keyed field lines and dotted relations mean erd;
  • blocks and activations mean sequence;
  • cloud icons mean architecture;
  • otherwise flowchart.

The detected header is prepended to the output.

An example#

This eraser flow:

Compute [icon: aws-ec2] > Storage [icon: aws-s3]
Storage > Database [icon: aws-rds]

converts to Koboyo code that renders like this:

Compute [aws/ec2]
Storage [aws/simple-storage-service]
Database [aws/rds]

Compute -> Storage -> Database
DiagramComputeStorageDatabase
Eraser's `>` becomes `->`, and its dashed icon names normalize to the catalog form.

Cardinality and connectors#

  • ERD relations use eraser's cardinality: > for N:1, < for 1:N, - for 1:1, <> for N:M.
  • Graph and sequence connectors normalize to ours: > becomes ->, <> becomes <->; plain lines (-, --) become arrows with a note.
  • Table icons are dropped with a diagnostic (entities take only a colour); styleMode, typeface, and autoNumber lines are commented out.

Idempotent#

Every input line maps to one output line, so diagnostics point at the converted text. Text that already starts with a family header passes through untouched, so converting the same input twice is safe.

Every diagram on these pages is compiled live from the code above it, through the same pipeline the app uses. Open the canvas to try it.