Allow pasing text directly

This commit is contained in:
2026-09-10 11:47:16 +02:00
parent 2d7e8aa20f
commit ada2c3d89d
4 changed files with 275 additions and 23 deletions
+11
View File
@@ -38,6 +38,7 @@ reshuffle.
| Drag a group | Moves the group and everything inside it |
| Drag on empty canvas | Rubber-band selection (hold <kbd>Shift</kbd> to add) |
| Middle- or right-drag | Pan |
| Drop files on the window | A file node each; a `.canvas` file opens instead |
| Wheel over a node | Scroll contents that are taller than the node |
| <kbd>Ctrl</kbd>+wheel | Zoom around the pointer |
@@ -57,6 +58,16 @@ stored as a `label` attribute — the name groups and edges already use — so a
tool that does not know about it carries it through untouched. This is an
addition to the format; see [`spec/extensions.md`](spec/extensions.md).
**Dropping and pasting things in**: drop files on the window and each becomes a
file node, with its path stored relative to the canvas when it lives beside it.
Paste text and it becomes a note, or a link node when the text is a URL. A copy
made in the editor goes onto the system clipboard as JSON Canvas, so it pastes
back into another window as nodes rather than as text.
Dropping *text* on the window does nothing, and no drop lands under the pointer:
the windowing layer this editor is built on accepts file drags only, and discards
the position that comes with them. Paste is the way in for text.
**The usual editor comforts**: undo/redo of every change, copy/paste/duplicate,
grouping, alignment, z-order, a properties inspector, snap-to-grid, light and
dark themes, and a warning before you lose unsaved work.