css-shapes-editor
css-shapes-editor copied to clipboard
Support editing `d` path attributes.
What would be involved with creating an editor for the d
attribute of the path
tag?
It shouldn't be too difficult to adapt this for editing SVG <path>
.
Under the hood, this library already uses SVG (Snap.svg) to draw the editor UI. The polygon editor is actually represented with a <path>
and its d
value is rebuilt as the user edits vertices.
For now, it only supports Move and Line, no Arcs or Curves since these are not yet supported in the CSS Shapes polygon()
syntax. With a bit of UI additions, you can adapt it for editing SVG paths.