Copying Values of Attributes in Author Mode

Oxygen general issues.
fhorn
Posts: 18
Joined: Mon Dec 09, 2013 7:47 pm

Copying Values of Attributes in Author Mode

Post by fhorn »

Hello,

is it possible to copy the value of an attribute in the author mode?
In the CSS, the attribute xml:id is specified as follows:

Code: Select all


element:before{
content: attr(xml\:id);
}
The css is part of a project specific framework. If I copy the value
of the attribute shown in the author mode and try to paste it elsewhere
in the document, the xml content is pasted. There is no difference if I
remove the CSS selector :before.

Thanks,
Franziska
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

Re: Copying Values of Attributes in Author Mode

Post by alex_jitianu »

Hello,

Unfortunately you can't copy static text in the Author mode. Even though the selection shows the static content as being selected, the copy action will skip the static content.

Possible ways to get the value of the xml:id attribute:
1. you can use the Attributes View to select the xml:id attribute and copy it
2. instead of showing the attribute's value as a static content use a form control:

Code: Select all


element:before{
content: oxy_textfield(edit, '@xml:id');
}
This way you can select the value in the form control and copy it.
3. You could add an in-place author action next to the static content that when pressed it will copy the value. Unfortunately there isn't a built-in AuthorOperation to do this copy so if you want to go on this approach you will have to use our JAVA based API to create such an operation : Custom Operation. Please let me know if you are interested so I can give you more details.

Best regards,
Alex
Post Reply