The oxy_button built-in form control is used for graphical user
interface objects that invoke a custom Author mode action (defined in the
associated Document Type) referencing it by its ID, or directly in the CSS.
oxy_button form control supports the following properties:true or false (default value). To
make the form control inherit its font from its parent element, set the
fontInherit property to true.color property is
inherit, the form control has the same color as the element that was
used to insert it.true (default value) and false.true or false (default value).true or
false.element {
content: oxy_button(actionID, 'remove.attribute', showText, true);
}true or false.element {
content: oxy_button(actionID, 'remove.attribute', showIcon, 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_button(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}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.actionID parameter to reference an action from the document type
association. This property is defined using the oxy_action
function.oxy_button(action, oxy_action(
name, 'Insert',
description, 'Insert an element after the current one',
icon, url('insert.png'),
operation, 'InsertFragmentOperation',
arg-fragment, '<element>${caret}</element>',
arg-insertLocation, '.',
arg-insertPosition, 'After'
))button:before {
content: "Label:"
oxy_button(
/* This action is declared in the document type
associated with the XML document. */
actionID, "insert.popupWithMultipleSelection");
}oxy_button form control in a CSS
file , invoke the Content Completion
Assistant by pressing Ctrl +
Space and select the
oxy_button code template. Also, an
oxy_button_in_place_action code template is available that inserts an
oxy_button function that includes an action
parameter.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: