Page 1 of 1
CSS capability for adding multiple attributes in one click
Posted: Wed Apr 25, 2018 11:35 am
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
Re: CSS capability for adding multiple attributes in one click
Posted: Wed Apr 25, 2018 3:13 pm
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