Skip to content

Commit 1cbdf60

Browse files
committed
[add] getText() page for Textarea
1 parent 76fb1f9 commit 1cbdf60

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

docs/form/api/input/input_gettext_method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ The method is used with the [`numberMask`](form/work_with_form.md#numbermask) an
2323
@changelog:
2424
Added in v9.0
2525

26-
**Related:** [Getting the text value of an input](form/work_with_form.md#getting-the-text-value-of-an-input)
26+
**Related:** [Getting the text value of an input](form/work_with_form.md#getting-the-text-value-of-an-input-or-a-textarea)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
sidebar_label: getText()
3+
title: JavaScript Form - getText Textarea Method
4+
description: You can explore the getText method of the Textarea control of Form in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite.
5+
---
6+
7+
# getText()
8+
9+
@short: returns the text value of the textarea with the applied mask
10+
11+
@signature: {'getText(): string;'}
12+
13+
@returns:
14+
A string with the text with the applied mask
15+
16+
@example:
17+
const value = form.getItem("textarea").getText();
18+
// -> "100000.01"
19+
20+
@descr:
21+
The method is used with the [`numberMask`](form/work_with_form.md#numbermask) and [`patternMask`](form/work_with_form.md#patternmask) properties of the Textarea control. It allows getting the value with the applied mask.
22+
23+
@changelog:
24+
Added in v9.0
25+
26+
**Related:** [Getting the text value of a textarea](form/work_with_form.md#getting-the-text-value-of-an-input-or-a-textarea)

docs/form/work_with_form.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ In the above example:
319319

320320
**Related sample**: [Form. Pattern mask](https://snippet.dhtmlx.com/gu1ekt1z)
321321

322-
### Getting the text value of an input
322+
### Getting the text value of an input or a textarea
323323

324-
When you need to get the value of an input with the applied mask, you can use the [`getText()`](form/api/input/input_gettext_method.md) method of the **Input** control.
325-
It returns the input value of the control as a string. The method is used with the `numberMask` and `patternMask` properties of the Input control.
324+
When you need to get the value of an input or a textarea with the applied mask, you can use the [`getText()`](form/api/input/input_gettext_method.md) method of the **Input** control or the [`getText()`](form/api/textarea/textarea_gettext_method.md) method of the **Textarea** control.
325+
It returns the input value of the control as a string. The method is used with the `numberMask` and `patternMask` properties of the control.
326326

327327
~~~jsx
328328
const value = form.getItem("input").getText();

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,7 @@ module.exports = {
21192119
"form/api/textarea/textarea_enable_method",
21202120
"form/api/textarea/textarea_focus_method",
21212121
"form/api/textarea/textarea_getproperties_method",
2122+
"form/api/textarea/textarea_gettext_method",
21222123
"form/api/textarea/textarea_getvalue_method",
21232124
"form/api/textarea/textarea_hide_method",
21242125
"form/api/textarea/textarea_isdisabled_method",

0 commit comments

Comments
 (0)