CSS capability for adding multiple attributes in one click

Are you missing a feature? Request its implementation here.
gpmn
Posts: 6
Joined: Wed Apr 25, 2018 11:28 am

CSS capability for adding multiple attributes in one click

Post by gpmn »

Hi

Does Oxygen 18.1 has CSS capability of adding multiple attributes with values in one click ?

For example : If I need to add align=“left”, and the placement=“break" for an image at one click.

Best Regards,
Girish
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: CSS capability for adding multiple attributes in one click

Post by alex_jitianu »

Hi Girish,

It is possible. First of all, in the document type association you need to define 3 actions:
1. An author action that uses the ChangeAttributeOperation to set align=“left”
2. An author action that uses the ChangeAttributeOperation to set placement=“break"
3. An author action that uses ExecuteMultipleActionsOperation to chain the two previous actions.

Let's assume that the ID of the third action is "image_left_break". You can either put this action on the toolbar (from the same document type configuration) or you can bind it in the CSS next to the image using a button form control:

Code: Select all

*[class~='topic/image']:before {
content:
oxy_button(
/* This action is declared in the document type associated with the XML document. */
actionID, "image_left_break");
}
It's worth mentioning that in Oxygen version 20 you can do everything from the CSS by using a new oxy_compound_action() function.

Best regards,
Alex
Post Reply