Add class attribute to svg

496 views
Skip to first unread message

Nico Preston

unread,
Jan 31, 2021, 2:50:42 PM1/31/21
to dra...@googlegroups.com
I'm trying to add a class attribute to a diagrams.net (draw.io) svg, so I can style it later with CSS. The diagram was created with the app and saved as type ".svg"

Consider two simple shapes:
image.png
I can "edit data" to add a class to shape1:
image.png
This shows up in Extras>Edit Diagram:
image.png

But when I open the svg file in a text editor, the class cannot be found.  I honestly have no idea where diagrams.net is even saving the data, as there is only the one .svg file with no metadata. This is the case if I open the diagrams.net .svg file or export as svg.

Any help would be appreciated. I've tried .drawio format, tags and styles without success.

Thanks,
Nico

Arijit Aich

unread,
Nov 4, 2021, 7:33:56 AM11/4/21
to diagrams.net Q&A
facing the same issue.... Just cant edit the labels
Reply all
Reply to author
Forward
0 new messages