The oxy_textArea built-in form control is used for entering multiple
lines of text in a graphical user interface box. A text area may include optional syntax
highlight capabilities to present the form control.
The oxy_textArea form control supports the following properties:
- edit - Lets you edit the value of an
attribute, the text content of an element, or Processing Instructions (PI). This property
can have the following values:
- #content - This parameter is useful when an element has mixed or element-only
content and you want to edit its content inside a text area form control.
For example, if
you have the following XML
content:
<codeblock outputclass="language-xml">START_TEXT<ph>phase</ph><apiname><text>API</text></apiname></codeblock>
and
your CSS includes the following
snippet:
codeblock:before{
content:
oxy_textArea(
edit, '#content',
contentType, 'text/xml');
}
then
the text area form control will edit the following
fragment:
START_TEXT<ph>phase</ph><apiname><text>API</text></apiname>
Note: When
the value of the edit property is #content, the text
area form control will also offer content completion proposals.
- columns - Controls the width of the form
control. The unit size is the width of the w character.
- width - Specifies the width of the content area
using relative (em, ex), absolute (in,
cm, mm, pt, pc,
px), and percentage (followed by the % character)
length units. The width property takes precedence over the
columns property (if the two are used together).
- fontInherit - This value specifies whether
the form control inherits its font from its parent element. The values of this property
can be true or false (default value). To make the form
control inherit its font from its parent element, set the fontInherit
property to true.
- visible - Specifies whether or not the form
control is visible. The possible values of this property are true
(default value) and false.
- rows - This property specifies the number of rows
that the form control presents. If the form control
has more lines, you are able to scroll and see them all.
-
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.
- indentOnTab - Specifies the behavior of the
Tab key. If the value of this property is set to
true (default value), the Tab key inserts
characters. If it is set to false, Tab is used for
navigation, jumping to the next editable position in the document.
- The white-space CSS property influences the value that you edit, as well
as the from control size:
- hoverPseudoclassName - Allows you to change the
way an element is rendered when you hover over a form control. The value is the name of a
CSS pseudo-class. When you hover over the form control, the specified pseudo-class will be
set on the element that contains the form control.
p:before {
content: oxy_textArea(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}
The following example presents a text area with CSS syntax highlighting that calculates its
own dimension, and a second one with XML syntax highlighting with defined dimension.
textArea {
visibility: -oxy-collapse-text;
white-space: pre;
}
textArea[language="CSS"]:before {
content: oxy_textArea(
edit, '#text',
contentType, 'text/css');
}
textArea[language="XML"]:before {
content: oxy_textArea(
edit, '#text',
contentType, 'text/xml',
rows, 10,
columns, 30);
}
Note: You can use the
Content Completion
Assistant in the CSS or LESS editor to easily insert a sample of the form
control by selecting the corresponding code template. The form control code templates are
displayed with a

symbol in the content complete list.
Tip: To insert a sample of the
oxy_textArea form control, invoke
the
Content Completion Assistant by pressing
Ctrl Space (Command Space on OS
X) and select
the
oxy_textArea code template.