The oxy_editor function allows you to edit attributes or simple element values in the Author mode, using standard built-in form controls (such as combo boxes, text fields, pop-ups, URL choosers, etc.) or to implement your own custom form controls and renderers.
myElement {
content: oxy_editor(
type, [my form control],
edit, "@my_attr"
)
}
The oxy_editor custom form control supports the following properties:
oxy_action(
name, 'Insert Section',
description, 'Insert an element after the current one',
icon, url('insert.png'),
operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation',
arg-fragment, '<element>${caret}</element>',
arg-insertLocation, '.',
arg-insertPosition, 'After'
)
oxy_action_list(
oxy_action(
name, 'Insert',
description, 'Insert an element after the current one',
operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation',
arg-fragment, '<element></element>',
arg-insertLocation, '.',
arg-insertPosition, 'After'
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'ro.sync.ecss.extensions.commons.operations.DeleteElementOperation'
)
)
contentType - Specifies the type of content for which the form control offers syntax highlighting. The following values are supported: text/css; text/shell; text/cc; text/xquery; text/xml; text/python; text/xsd; text/c; text/xpath; text/javascript; text/xsl; text/wsdl; text/html; text/xproc; text/properties; text/sql; text/rng; text/sch; text/json; text/perl; text/php; text/java; text/batch; text/rnc; text/dtd; text/nvdl; text/plain.
element {
content: oxy_button(actionID, 'remove.attribute', showIcon, true);
}
element {
content: oxy_button(actionID, 'remove.attribute', showText, true);
}
element {
content:
oxy_label(text, "Label1:", width, 20em, text-align, center)
oxy_label(text, "Label2:", width, 100px, text-align, right)
}
p:before {
content: oxy_button(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}