Inkscape.org
Beginners' Questions Why path ID's/Labels are not being saved or exported
  1. #1
    Harliquinn Harliquinn @Harliquinn

    Is there a secret to getting Path ID's and Labels to persist through saving or exporting an Inkscape file? I am trying to create a clickable map using Inkscape and paths, and I spent time creating ID's that I wanted to be used in the .svg file within a web page. But when I save or export the file, the ID's and Labels are gone and when I go back to the file within Inkscape they are all gone there as well.

    How do I create ID's for my paths that will be saved so I can use them for styling in a CSS/HTML page?

  2. #2
    inklinea inklinea @inklinea⛰️

    That does sound strange. 

    ids are part of the svg structure, and *must* be unique.

    labels are part of the Inkscape namespace and *do not* have to be unique.

    I can think of a couple of things. 

    Are you saving to standard SVG instead of Inkscape SVG ? That would destroy labels.

    Are you creating id conflicts by editing the ids directly in the Inkscape XML editor window ?

    I would not use labels for further use with standard CSS/HTML.

    If you want to avoid manipulating ids, ( which can break the structure of the SVG ) :

    You can use your own custom attributes - the safest for use in external programs is the standard data-* format ( see mozilla )

  3. #3
    COD COD @COD

    Reddit post about this with possible fix:
    https://www.reddit.com/r/Inkscape/comments/1g0cyrv/how_to_set_up_grid_layout_like_this/

    Gitlab post:
    https://gitlab.com/inkscape/inkscape/-/issues/3743

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Why path ID's/Labels are not being saved or exported