The Custom Attribute extension for the Inkscape graphic editor allows adding custom attributes in the form of “name=value” pairs to selected objects of the current SVG document.
Extension functionality
In the simplest case, when you just need to set an attribute and its value for selected objects, it is enough to specify the attribute name in the Attribute Name field and its value in the Attribute Value field.
After pressing the Apply button, each of the selected objects will be assigned an attribute with the specified name and value. The attribute is created in a common namespace.
If you need to add an attribute to an object in a custom namespace, you must also specify the namespace name in the Attribute Namespace field. In this case, a new namespace is created in the SVG document with the specified name (if one has not been created previously) and all selected objects are assigned an attribute in the specified namespace.
To change the value of a previously created attribute, use the extension to reassign the attribute with the required name and new value to the object.
You can check the attributes assigned to objects by calling the built-in XML editor in Inkscape.
Assigned attributes are saved to the SVG file. You can check them by opening the saved SVG file in a text editor:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg ... xmlns:my_namespace="http://my_namespace.org/namespace"> ... <circle ... my_attribute="my_value_2" my_namespace:my_attribute="my_value_99" /> <g ... my_attribute="my_value_2" </g> </svg> |
Demonstration video
Current extension version
1.0.0.
For Inkscape version
1.3.
Location and call
Main menu – Extensions – Attributes – CustomAttribute
Installation
- Copy all the extension files to the Inkscape extensions directory or to the user Inkscape extensions directory:
1 |
c:\Users\_USER_NAME_\AppData\Roaming\inkscape\extensions\ |
- Restart Inkscape.
Version history
1.0.0.
- Release