feat: a shape can be a triangle, a star or a block arrow

Twelve presets beside the three rectangular ones. Each outline is one
polygon in utils/shapes.ts, given once: the node view draws it as an SVG
path, the ODF export scales the same points into draw:enhanced-path, and
Word gets the preset's name and draws its own geometry.

A gallery in the box toolbar and the ribbon renders its tiles from that
same table, so a new shape needs no icon. Verified through LibreOffice
from both formats; a preset we can't draw still imports as a warning.
This commit is contained in:
Steffen Becker committed 2026-08-14 08:02:08 +02:00
1 parent 5ee4eec5d7
commit 4cda289272
18 files changed
+566 -121

No files matched your search

+13
View File
@@ -513,9 +513,22 @@
.paper .tiptap .textbox-rotor {
cursor: move;
}
/* The outline of a shape CSS can't draw, behind the text. Such a frame carries no
padding of its own (the text inset moves to .textbox-content), so the padding box
this covers is the frame. overflow stays visible or the stroke is clipped in half
at the viewBox edge. */
.paper .tiptap .textbox-outline {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: visible;
pointer-events: none;
}
.paper .tiptap .textbox-content {
cursor: text;
min-height: 1em;
position: relative;
}
.paper .tiptap .textbox-content > :first-child {
margin-top: 0;