The oxy_buttonGroup built-in form control is used for a graphical user
interface group of buttons that invokes one of several custom Author mode
actions (defined in the associated Document Type) referencing it by its ID, or directly in the
CSS.
oxy_buttonGroup form control supports the following properties: true (default value) and false.true or false.true or false (default value). To
make the form control inherit its font from its parent element, set the
fontInherit property to true.true. This property
can be used to specify areas as read-only (by setting the
-oxy-editable property to false). This is useful when
you want to use an action that does not modify the context.p:before {
content: oxy_buttonGroup(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}actionID parameter to reference actions from the document type
association. This property is defined using the oxy_action_list
function.oxy_buttonGroup(
label, 'A group of actions',
icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'),
actions,
oxy_action_list(
oxy_action(
name, 'Insert',
description, 'Insert an element after the current one',
operation, 'InsertFragmentOperation',
arg-fragment, '<element></element>',
arg-insertLocation, '.',
arg-insertPosition, 'After'
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'DeleteElementOperation'
)
)
)oxy_action_list
function.p:before {
content:
oxy_buttonGroup(
label, 'A group of actions',
icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'),
actions,
oxy_action_list(
oxy_compound_action(
name, oxy_getActionName('framework.id', 'Fallback'),
description, 'Inserts a paragraph and uses form controls to edit its @audience attribute',
icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'),
oxy_action(
name, 'Insert',
description, 'Insert an element after the current one',
operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation',
icon, url('insert.png'),
arg-fragment, "<p audience=''></p>",
arg-insertLocation, '.',
arg-insertPosition, 'After'
),
oxy_action(
name, 'Activate edit mode',
description, 'Sets a pseudo class that will activate a CSS rule that will present a text field form control for the @audience attribute',
operation, 'SetPseudoClassOperation',
arg-name, 'edit-mode-on',
arg-elementLocation , '.'
)
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'DeleteElementOperation'
)
)
)
}element
(default value) and caret. If you select the element
value, the context is the element that holds the form control. If you select the
caret value, the action is invoked at the cursor location. If the
cursor is not inside the element that holds the form control, the element
value is selected automatically.text (default value),
icon, or both.buttongroup:before {
content:
oxy_label(text, "Button Group:", width, 150px, text-align, left)
oxy_buttonGroup(
label, 'A group of actions',
/* The action IDs are declared in the document type
associated with the XML document. */
actionIDs,
"insert.popupWithMultipleSelection,insert.popupWithSingleSelection",
actionStyle, "both");
} oxy_buttonGroup form control in a
CSS file , invoke the Content Completion
Assistant by pressing Ctrl +
Space and select the
oxy_buttonGroup code template. Also, an
oxy_buttonGroup_in_place_action code template is available that inserts an
oxy_buttonGroup function that includes an oxy_action_list
function.To see more detailed examples and more information about how form controls work in Oxygen XML Author Eclipse plugin, see the sample files in the following directory: [OXYGEN_INSTALL_DIR]/samples/form-controls.
For more information about form controls, watch our video demonstration: