Can't edit certain attributes in XML editor

Asked by Michael Baycura on 2017-08-12

when using the XML editor to change node attributes I can't add new or custom parts to the style attribute. for example, for a text node that has style attribute:

"font-style:normal;font-weight:normal;font-size:100px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"

I can change the values of the different style parts, like "font-size", but i can't add a style part that isn't there like "user-select:none".

 if i try to add ";user-select:none" to the end of the style value string and then click the "set" button it deletes my user-select part and won't update. If i use an external text editor and add "user-select:none" it shows up but i can't try to another part of the style attribute string or it will delete my add "user-select:none" part.

is there some way to keep inkscape from doing this? I'd like to be able to make Inkscape use non-standard and custom attributes edits in the xML editor.

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
2017-08-12
Last reply:
2017-08-12
Hachmann (marenhachmann) said : #1

Mmh, yes. I get the same, although in my preferences, at Input/Output -> SVG Output, I have selected 'print warnings', but not 'remove style properties'. I would have expected that that setting keeps them.

Unfortunately, I cannot find any documentation about that part of the dialog. I suppose you found a bug, but I am not sure.

Can you make a bug report, so developers can decide what they think this is?

Hachmann (marenhachmann) said : #2

Oh, and I just found this, which is probably of interest to you:
https://gitlab.com/inkscape/inkscape/tree/0.92.x/share/attributes

Michael Baycura (mbaycura) said : #3

Thanks for the tips, i posted this as a bug, we'll see if there's something I'm missing. I tried looking at those Inkscape attribute management files you identified and I found what attributes can be used with what elements, but i couldn't find anything that was defining what the valid sub-parts of the style attribute were.
For my immediate need i found using a document level <style> "some CSS" </style> to be a better solution and i can add whatever syntax i want in there and the XML editor will leave it alone.

Hachmann (marenhachmann) said : #4

FTR: https://bugs.launchpad.net/inkscape/+bug/1710670

(I'm interested in the answer, too!)

Can you help with this problem?

Provide an answer of your own, or ask Michael Baycura for more information if necessary.

To post a message you must log in.