Code Box¶
CodeBox edits the inner text of its bound XPath with the code editor. Mode selects editor language support: JavaScript (default), XQuery, Html, or StyleSheet. Size is retained as an editor-size option; the current form renderer uses an automatic editor height.
Definitions and Arguments¶
Definitions supplies editor definitions for code assistance. Arguments and Name identify the code block for the feature that consumes it; the editor does not itself execute the entered code.
The widget is read-only when disabled and synchronizes editor changes to the bound node. Editing JavaScript, XQuery, HTML, or stylesheets in a form does not by itself grant permission to run the code; execution, validation, and authorization belong to the consuming feature.
XML Fields¶
XPathidentifies the element that stores the edited code.Nameidentifies this code block to the feature that consumes it.ModeselectsJavaScript,XQuery,Html, orStyleSheetediting support.Definitions/Definitionsupplies zero or more names used for code assistance.Arguments/Argumentsupplies the parameters expected by the consumer of the code block.Sizeselects the editor-size option; the current form renderer uses an automatic editor height.RequiredForGroup,PlaceHolder,Hints, andRuleshave the same roles as in other text-input widgets: validation grouping, empty-state prompt, user guidance, and conditional form behavior.
The editor persists only text at XPath; Definitions, Arguments, and Name describe how another configured feature should interpret that text.
Example¶
1 2 3 4 5 6 7 8 9 | |