1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Provides the method of switching the cursor position. 23 * 24 * @extends TextContentControllerBase 25 * @since 8 26 */ 27/** 28 * Provides the method of switching the cursor position. 29 * 30 * @extends TextContentControllerBase 31 * @syscap SystemCapability.ArkUI.ArkUI.Full 32 * @crossplatform 33 * @since 10 34 */ 35/** 36 * Provides the method of switching the cursor position. 37 * 38 * @extends TextContentControllerBase 39 * @syscap SystemCapability.ArkUI.ArkUI.Full 40 * @crossplatform 41 * @atomicservice 42 * @since 11 43 */ 44declare class TextAreaController extends TextContentControllerBase { 45 /** 46 * constructor. 47 * 48 * @syscap SystemCapability.ArkUI.ArkUI.Full 49 * @since 8 50 */ 51 /** 52 * constructor. 53 * 54 * @syscap SystemCapability.ArkUI.ArkUI.Full 55 * @crossplatform 56 * @since 10 57 */ 58 /** 59 * constructor. 60 * 61 * @syscap SystemCapability.ArkUI.ArkUI.Full 62 * @crossplatform 63 * @atomicservice 64 * @since 11 65 */ 66 constructor(); 67 68 /** 69 * Called when the position of the insertion cursor is set. 70 * 71 * @param { number } value 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 8 74 */ 75 /** 76 * Called when the position of the insertion cursor is set. 77 * 78 * @param { number } value 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @since 10 82 */ 83 /** 84 * Called when the position of the insertion cursor is set. 85 * 86 * @param { number } value 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @atomicservice 90 * @since 11 91 */ 92 caretPosition(value: number): void; 93 94 /** 95 * Text selection is achieved by specifying the start and end positions of the text. 96 * 97 * @param { number } selectionStart - The start position of the selected text. 98 * @param { number } selectionEnd - The end position of the selected text. 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @crossplatform 101 * @since 10 102 */ 103 /** 104 * Text selection is achieved by specifying the start and end positions of the text. 105 * 106 * @param { number } selectionStart - The start position of the selected text. 107 * @param { number } selectionEnd - The end position of the selected text. 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @crossplatform 110 * @atomicservice 111 * @since 11 112 */ 113 /** 114 * Text selection is achieved by specifying the start and end positions of the text. 115 * 116 * @param { number } selectionStart - The start position of the selected text. 117 * @param { number } selectionEnd - The end position of the selected text. 118 * @param { SelectionOptions } [options] - Indicates the options of the text selection. 119 * @syscap SystemCapability.ArkUI.ArkUI.Full 120 * @crossplatform 121 * @atomicservice 122 * @since 12 123 */ 124 setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; 125 126 /** 127 * Exit edit state. 128 * 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133 /** 134 * Exit edit state. 135 * 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @atomicservice 139 * @since 11 140 */ 141 stopEditing(): void; 142} 143 144/** 145 * Defines the options of TextArea. 146 * 147 * @interface TextAreaOptions 148 * @syscap SystemCapability.ArkUI.ArkUI.Full 149 * @since 7 150 */ 151/** 152 * Defines the options of TextArea. 153 * 154 * @interface TextAreaOptions 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @crossplatform 157 * @since 10 158 */ 159/** 160 * Defines the options of TextArea. 161 * 162 * @interface TextAreaOptions 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @crossplatform 165 * @atomicservice 166 * @since 11 167 */ 168declare interface TextAreaOptions { 169 /** 170 * The place holder text string. 171 * 172 * @type { ?ResourceStr } 173 * @syscap SystemCapability.ArkUI.ArkUI.Full 174 * @since 7 175 */ 176 /** 177 * The place holder text string. 178 * 179 * @type { ?ResourceStr } 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @since 10 183 */ 184 /** 185 * The place holder text string. 186 * 187 * @type { ?ResourceStr } 188 * @syscap SystemCapability.ArkUI.ArkUI.Full 189 * @crossplatform 190 * @atomicservice 191 * @since 11 192 */ 193 placeholder?: ResourceStr; 194 195 /** 196 * Sets the current value of TextArea. 197 * 198 * @type { ?ResourceStr } 199 * @syscap SystemCapability.ArkUI.ArkUI.Full 200 * @since 7 201 */ 202 /** 203 * Sets the current value of TextArea. 204 * 205 * @type { ?ResourceStr } 206 * @syscap SystemCapability.ArkUI.ArkUI.Full 207 * @crossplatform 208 * @since 10 209 */ 210 /** 211 * Sets the current value of TextArea. 212 * 213 * @type { ?ResourceStr } 214 * @syscap SystemCapability.ArkUI.ArkUI.Full 215 * @crossplatform 216 * @atomicservice 217 * @since 11 218 */ 219 text?: ResourceStr; 220 221 /** 222 * Called when the position of the insertion cursor is set. 223 * 224 * @type { ?TextAreaController } 225 * @syscap SystemCapability.ArkUI.ArkUI.Full 226 * @since 8 227 */ 228 /** 229 * Called when the position of the insertion cursor is set. 230 * 231 * @type { ?TextAreaController } 232 * @syscap SystemCapability.ArkUI.ArkUI.Full 233 * @crossplatform 234 * @since 10 235 */ 236 /** 237 * Called when the position of the insertion cursor is set. 238 * 239 * @type { ?TextAreaController } 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @atomicservice 243 * @since 11 244 */ 245 controller?: TextAreaController; 246} 247 248/** 249 * Provides an interface for the multi-line text input component. 250 * 251 * @interface TextAreaInterface 252 * @syscap SystemCapability.ArkUI.ArkUI.Full 253 * @since 7 254 */ 255/** 256 * Provides an interface for the multi-line text input component. 257 * 258 * @interface TextAreaInterface 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @since 10 262 */ 263/** 264 * Provides an interface for the multi-line text input component. 265 * 266 * @interface TextAreaInterface 267 * @syscap SystemCapability.ArkUI.ArkUI.Full 268 * @crossplatform 269 * @atomicservice 270 * @since 11 271 */ 272interface TextAreaInterface { 273 /** 274 * Called when writing multiple lines of text. 275 * 276 * @param { TextAreaOptions } value 277 * @returns { TextAreaAttribute } 278 * @syscap SystemCapability.ArkUI.ArkUI.Full 279 * @since 7 280 */ 281 /** 282 * Called when writing multiple lines of text. 283 * 284 * @param { TextAreaOptions } value 285 * @returns { TextAreaAttribute } 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @crossplatform 288 * @since 10 289 */ 290 /** 291 * Called when writing multiple lines of text. 292 * 293 * @param { TextAreaOptions } value 294 * @returns { TextAreaAttribute } 295 * @syscap SystemCapability.ArkUI.ArkUI.Full 296 * @crossplatform 297 * @atomicservice 298 * @since 11 299 */ 300 (value?: TextAreaOptions): TextAreaAttribute; 301} 302 303/** 304 * Declare the type of input box 305 * 306 * @enum { number } 307 * @syscap SystemCapability.ArkUI.ArkUI.Full 308 * @crossplatform 309 * @since 11 310 */ 311/** 312 * Declare the type of input box 313 * 314 * @enum { number } 315 * @syscap SystemCapability.ArkUI.ArkUI.Full 316 * @crossplatform 317 * @atomicservice 318 * @since 12 319 */ 320declare enum TextAreaType { 321 /** 322 * Basic input mode. 323 * 324 * @syscap SystemCapability.ArkUI.ArkUI.Full 325 * @crossplatform 326 * @since 11 327 */ 328 /** 329 * Basic input mode. 330 * 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @crossplatform 333 * @atomicservice 334 * @since 12 335 */ 336 NORMAL = 0, 337 338 /** 339 * Pure digital input mode. 340 * 341 * @syscap SystemCapability.ArkUI.ArkUI.Full 342 * @crossplatform 343 * @since 11 344 */ 345 /** 346 * Pure digital input mode. 347 * 348 * @syscap SystemCapability.ArkUI.ArkUI.Full 349 * @crossplatform 350 * @atomicservice 351 * @since 12 352 */ 353 NUMBER = 2, 354 355 /** 356 * Phone number entry mode. 357 * 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @crossplatform 360 * @since 11 361 */ 362 /** 363 * Phone number entry mode. 364 * 365 * @syscap SystemCapability.ArkUI.ArkUI.Full 366 * @crossplatform 367 * @atomicservice 368 * @since 12 369 */ 370 PHONE_NUMBER = 3, 371 372 /** 373 * E-mail address input mode. 374 * 375 * @syscap SystemCapability.ArkUI.ArkUI.Full 376 * @crossplatform 377 * @since 11 378 */ 379 /** 380 * E-mail address input mode. 381 * 382 * @syscap SystemCapability.ArkUI.ArkUI.Full 383 * @crossplatform 384 * @atomicservice 385 * @since 12 386 */ 387 EMAIL = 5, 388 389 /** 390 * Number decimal entry mode. 391 * 392 * @syscap SystemCapability.ArkUI.ArkUI.Full 393 * @crossplatform 394 * @atomicservice 395 * @since 12 396 */ 397 NUMBER_DECIMAL = 12, 398 399 /** 400 * URL entry mode. 401 * 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @crossplatform 404 * @atomicservice 405 * @since 12 406 */ 407 URL = 13, 408} 409 410/** 411 * Declare the content type of input box 412 * 413 * @enum { number } 414 * @syscap SystemCapability.ArkUI.ArkUI.Full 415 * @atomicservice 416 * @since 12 417 */ 418declare enum ContentType { 419 /** 420 * User name content type. 421 * 422 * @syscap SystemCapability.ArkUI.ArkUI.Full 423 * @atomicservice 424 * @since 12 425 */ 426 USER_NAME = 0, 427 428 /** 429 * Password content type. 430 * 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @atomicservice 433 * @since 12 434 */ 435 PASSWORD = 1, 436 437 /** 438 * New password content type. 439 * 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @atomicservice 442 * @since 12 443 */ 444 NEW_PASSWORD = 2, 445 446 /** 447 * Full street address content type. 448 * 449 * @syscap SystemCapability.ArkUI.ArkUI.Full 450 * @atomicservice 451 * @since 12 452 */ 453 FULL_STREET_ADDRESS = 3, 454 455 /** 456 * House number content type. 457 * 458 * @syscap SystemCapability.ArkUI.ArkUI.Full 459 * @atomicservice 460 * @since 12 461 */ 462 HOUSE_NUMBER = 4, 463 464 /** 465 * District address content type. 466 * 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @atomicservice 469 * @since 12 470 */ 471 DISTRICT_ADDRESS = 5, 472 473 /** 474 * City address content type. 475 * 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @atomicservice 478 * @since 12 479 */ 480 CITY_ADDRESS = 6, 481 482 /** 483 * Province address content type. 484 * 485 * @syscap SystemCapability.ArkUI.ArkUI.Full 486 * @atomicservice 487 * @since 12 488 */ 489 PROVINCE_ADDRESS = 7, 490 491 /** 492 * Country address content type. 493 * 494 * @syscap SystemCapability.ArkUI.ArkUI.Full 495 * @atomicservice 496 * @since 12 497 */ 498 COUNTRY_ADDRESS = 8, 499 500 /** 501 * Person full name content type. 502 * 503 * @syscap SystemCapability.ArkUI.ArkUI.Full 504 * @atomicservice 505 * @since 12 506 */ 507 PERSON_FULL_NAME = 9, 508 509 /** 510 * Person last name content type. 511 * 512 * @syscap SystemCapability.ArkUI.ArkUI.Full 513 * @atomicservice 514 * @since 12 515 */ 516 PERSON_LAST_NAME = 10, 517 518 /** 519 * Person first name content type. 520 * 521 * @syscap SystemCapability.ArkUI.ArkUI.Full 522 * @atomicservice 523 * @since 12 524 */ 525 PERSON_FIRST_NAME = 11, 526 527 /** 528 * Phone number content type. 529 * 530 * @syscap SystemCapability.ArkUI.ArkUI.Full 531 * @atomicservice 532 * @since 12 533 */ 534 PHONE_NUMBER = 12, 535 536 /** 537 * Phone country code content type. 538 * 539 * @syscap SystemCapability.ArkUI.ArkUI.Full 540 * @atomicservice 541 * @since 12 542 */ 543 PHONE_COUNTRY_CODE = 13, 544 545 /** 546 * Full phone number content type. 547 * 548 * @syscap SystemCapability.ArkUI.ArkUI.Full 549 * @atomicservice 550 * @since 12 551 */ 552 FULL_PHONE_NUMBER = 14, 553 554 /** 555 * Email address content type. 556 * 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @atomicservice 559 * @since 12 560 */ 561 EMAIL_ADDRESS = 15, 562 563 /** 564 * Bank card number content type. 565 * 566 * @syscap SystemCapability.ArkUI.ArkUI.Full 567 * @atomicservice 568 * @since 12 569 */ 570 BANK_CARD_NUMBER = 16, 571 572 /** 573 * ID card number content type. 574 * 575 * @syscap SystemCapability.ArkUI.ArkUI.Full 576 * @atomicservice 577 * @since 12 578 */ 579 ID_CARD_NUMBER = 17, 580 581 /** 582 * Nickname content type. 583 * 584 * @syscap SystemCapability.ArkUI.ArkUI.Full 585 * @atomicservice 586 * @since 12 587 */ 588 NICKNAME = 23, 589 590 /** 591 * Detail info without street content type. 592 * 593 * @syscap SystemCapability.ArkUI.ArkUI.Full 594 * @atomicservice 595 * @since 12 596 */ 597 DETAIL_INFO_WITHOUT_STREET = 24, 598 599 /** 600 * Format address content type. 601 * 602 * @syscap SystemCapability.ArkUI.ArkUI.Full 603 * @atomicservice 604 * @since 12 605 */ 606 FORMAT_ADDRESS = 25 607} 608 609/** 610 * Declare the event listener callback of the enter key. 611 * 612 * @typedef { function } TextAreaSubmitCallback 613 * @param { EnterKeyType } enterKeyType - The enter key type of soft keyboard. 614 * @param { SubmitEvent } [event] - Provides the method of keeping textArea editable state when submitted. 615 * @syscap SystemCapability.ArkUI.ArkUI.Full 616 * @crossplatform 617 * @atomicservice 618 * @since 14 619 */ 620declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; 621 622/** 623 * Defines the attribute functions of TextArea. 624 * 625 * @extends CommonMethod<TextAreaAttribute> 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @since 7 628 */ 629/** 630 * Defines the attribute functions of TextArea. 631 * 632 * @extends CommonMethod<TextAreaAttribute> 633 * @syscap SystemCapability.ArkUI.ArkUI.Full 634 * @crossplatform 635 * @since 10 636 */ 637/** 638 * Defines the attribute functions of TextArea. 639 * 640 * @extends CommonMethod<TextAreaAttribute> 641 * @syscap SystemCapability.ArkUI.ArkUI.Full 642 * @crossplatform 643 * @atomicservice 644 * @since 11 645 */ 646declare class TextAreaAttribute extends CommonMethod<TextAreaAttribute> { 647 /** 648 * Called when the color of the placeholder is set. 649 * 650 * @param { ResourceColor } value 651 * @returns { TextAreaAttribute } 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @since 7 654 */ 655 /** 656 * Called when the color of the placeholder is set. 657 * 658 * @param { ResourceColor } value 659 * @returns { TextAreaAttribute } 660 * @syscap SystemCapability.ArkUI.ArkUI.Full 661 * @crossplatform 662 * @since 10 663 */ 664 /** 665 * Called when the color of the placeholder is set. 666 * 667 * @param { ResourceColor } value 668 * @returns { TextAreaAttribute } 669 * @syscap SystemCapability.ArkUI.ArkUI.Full 670 * @crossplatform 671 * @atomicservice 672 * @since 11 673 */ 674 placeholderColor(value: ResourceColor): TextAreaAttribute; 675 676 /** 677 * Called when the font property of the placeholder is set. 678 * 679 * @param { Font } value 680 * @returns { TextAreaAttribute } 681 * @syscap SystemCapability.ArkUI.ArkUI.Full 682 * @since 7 683 */ 684 /** 685 * Called when the font property of the placeholder is set. 686 * 687 * @param { Font } value 688 * @returns { TextAreaAttribute } 689 * @syscap SystemCapability.ArkUI.ArkUI.Full 690 * @crossplatform 691 * @since 10 692 */ 693 /** 694 * Called when the font property of the placeholder is set. 695 * 696 * @param { Font } value 697 * @returns { TextAreaAttribute } 698 * @syscap SystemCapability.ArkUI.ArkUI.Full 699 * @crossplatform 700 * @atomicservice 701 * @since 11 702 */ 703 placeholderFont(value: Font): TextAreaAttribute; 704 705 /** 706 * Called when the type of soft keyboard input button is set. 707 * 708 * @param { EnterKeyType } value the type of soft keyboard 709 * @returns { TextAreaAttribute } 710 * @syscap SystemCapability.ArkUI.ArkUI.Full 711 * @crossplatform 712 * @since 11 713 */ 714 /** 715 * Called when the type of soft keyboard input button is set. 716 * 717 * @param { EnterKeyType } value the type of soft keyboard 718 * @returns { TextAreaAttribute } 719 * @syscap SystemCapability.ArkUI.ArkUI.Full 720 * @crossplatform 721 * @atomicservice 722 * @since 12 723 */ 724 enterKeyType(value: EnterKeyType): TextAreaAttribute; 725 726 /** 727 * Called when the alignment of the contents of a multiline text box is set. 728 * 729 * @param { TextAlign } value 730 * @returns { TextAreaAttribute } 731 * @syscap SystemCapability.ArkUI.ArkUI.Full 732 * @since 7 733 */ 734 /** 735 * Called when the alignment of the contents of a multiline text box is set. 736 * 737 * @param { TextAlign } value 738 * @returns { TextAreaAttribute } 739 * @syscap SystemCapability.ArkUI.ArkUI.Full 740 * @crossplatform 741 * @since 10 742 */ 743 /** 744 * Called when the alignment of the contents of a multiline text box is set. 745 * 746 * @param { TextAlign } value 747 * @returns { TextAreaAttribute } 748 * @syscap SystemCapability.ArkUI.ArkUI.Full 749 * @crossplatform 750 * @atomicservice 751 * @since 11 752 */ 753 textAlign(value: TextAlign): TextAreaAttribute; 754 755 /** 756 * Called when the insertion cursor color is set. 757 * 758 * @param { ResourceColor } value 759 * @returns { TextAreaAttribute } 760 * @syscap SystemCapability.ArkUI.ArkUI.Full 761 * @since 7 762 */ 763 /** 764 * Called when the insertion cursor color is set. 765 * 766 * @param { ResourceColor } value 767 * @returns { TextAreaAttribute } 768 * @syscap SystemCapability.ArkUI.ArkUI.Full 769 * @crossplatform 770 * @since 10 771 */ 772 /** 773 * Called when the insertion cursor color is set. 774 * 775 * @param { ResourceColor } value 776 * @returns { TextAreaAttribute } 777 * @syscap SystemCapability.ArkUI.ArkUI.Full 778 * @crossplatform 779 * @atomicservice 780 * @since 11 781 */ 782 caretColor(value: ResourceColor): TextAreaAttribute; 783 784 /** 785 * Called when the font color is set. 786 * 787 * @param { ResourceColor } value 788 * @returns { TextAreaAttribute } 789 * @syscap SystemCapability.ArkUI.ArkUI.Full 790 * @since 7 791 */ 792 /** 793 * Called when the font color is set. 794 * 795 * @param { ResourceColor } value 796 * @returns { TextAreaAttribute } 797 * @syscap SystemCapability.ArkUI.ArkUI.Full 798 * @crossplatform 799 * @since 10 800 */ 801 /** 802 * Called when the font color is set. 803 * 804 * @param { ResourceColor } value 805 * @returns { TextAreaAttribute } 806 * @syscap SystemCapability.ArkUI.ArkUI.Full 807 * @crossplatform 808 * @atomicservice 809 * @since 11 810 */ 811 fontColor(value: ResourceColor): TextAreaAttribute; 812 813 /** 814 * Called when the font size is set. 815 * 816 * @param { Length } value 817 * @returns { TextAreaAttribute } 818 * @syscap SystemCapability.ArkUI.ArkUI.Full 819 * @since 7 820 */ 821 /** 822 * Called when the font size is set. 823 * 824 * @param { Length } value 825 * @returns { TextAreaAttribute } 826 * @syscap SystemCapability.ArkUI.ArkUI.Full 827 * @crossplatform 828 * @since 10 829 */ 830 /** 831 * Called when the font size is set. 832 * 833 * @param { Length } value 834 * @returns { TextAreaAttribute } 835 * @syscap SystemCapability.ArkUI.ArkUI.Full 836 * @crossplatform 837 * @atomicservice 838 * @since 11 839 */ 840 fontSize(value: Length): TextAreaAttribute; 841 842 /** 843 * Called when the font style of a font is set. 844 * 845 * @param { FontStyle } value 846 * @returns { TextAreaAttribute } 847 * @syscap SystemCapability.ArkUI.ArkUI.Full 848 * @since 7 849 */ 850 /** 851 * Called when the font style of a font is set. 852 * 853 * @param { FontStyle } value 854 * @returns { TextAreaAttribute } 855 * @syscap SystemCapability.ArkUI.ArkUI.Full 856 * @crossplatform 857 * @since 10 858 */ 859 /** 860 * Called when the font style of a font is set. 861 * 862 * @param { FontStyle } value 863 * @returns { TextAreaAttribute } 864 * @syscap SystemCapability.ArkUI.ArkUI.Full 865 * @crossplatform 866 * @atomicservice 867 * @since 11 868 */ 869 fontStyle(value: FontStyle): TextAreaAttribute; 870 871 /** 872 * Called when the font weight is set. 873 * 874 * @param { number | FontWeight | string } value 875 * @returns { TextAreaAttribute } 876 * @syscap SystemCapability.ArkUI.ArkUI.Full 877 * @since 7 878 */ 879 /** 880 * Called when the font weight is set. 881 * 882 * @param { number | FontWeight | string } value 883 * @returns { TextAreaAttribute } 884 * @syscap SystemCapability.ArkUI.ArkUI.Full 885 * @crossplatform 886 * @since 10 887 */ 888 /** 889 * Called when the font weight is set. 890 * 891 * @param { number | FontWeight | string } value 892 * @returns { TextAreaAttribute } 893 * @syscap SystemCapability.ArkUI.ArkUI.Full 894 * @crossplatform 895 * @atomicservice 896 * @since 11 897 */ 898 fontWeight(value: number | FontWeight | string): TextAreaAttribute; 899 900 /** 901 * Called when the font list of text is set. 902 * 903 * @param { ResourceStr } value 904 * @returns { TextAreaAttribute } 905 * @syscap SystemCapability.ArkUI.ArkUI.Full 906 * @since 7 907 */ 908 /** 909 * Called when the font list of text is set. 910 * 911 * @param { ResourceStr } value 912 * @returns { TextAreaAttribute } 913 * @syscap SystemCapability.ArkUI.ArkUI.Full 914 * @crossplatform 915 * @since 10 916 */ 917 /** 918 * Called when the font list of text is set. 919 * 920 * @param { ResourceStr } value 921 * @returns { TextAreaAttribute } 922 * @syscap SystemCapability.ArkUI.ArkUI.Full 923 * @crossplatform 924 * @atomicservice 925 * @since 11 926 */ 927 fontFamily(value: ResourceStr): TextAreaAttribute; 928 929 /** 930 * Called when the overflow mode of the font is set. 931 * 932 * @param { TextOverflow } value 933 * @returns { TextAreaAttribute } 934 * @syscap SystemCapability.ArkUI.ArkUI.Full 935 * @crossplatform 936 * @atomicservice 937 * @since 12 938 */ 939 textOverflow(value: TextOverflow): TextAreaAttribute; 940 941 /** 942 * Specify the indentation of the first line in a text-block. 943 * 944 * @param { Dimension } value - The length of text indent. 945 * @returns { TextAreaAttribute } The attribute of the text. 946 * @syscap SystemCapability.ArkUI.ArkUI.Full 947 * @crossplatform 948 * @atomicservice 949 * @since 12 950 */ 951 textIndent(value: Dimension): TextAreaAttribute; 952 953 /** 954 * Called when the inputFilter of text is set. 955 * 956 * @param { ResourceStr } value 957 * @param { function } error 958 * @returns { TextAreaAttribute } 959 * @syscap SystemCapability.ArkUI.ArkUI.Full 960 * @since 8 961 */ 962 /** 963 * Called when the inputFilter of text is set. 964 * 965 * @param { ResourceStr } value 966 * @param { function } error 967 * @returns { TextAreaAttribute } 968 * @syscap SystemCapability.ArkUI.ArkUI.Full 969 * @crossplatform 970 * @since 10 971 */ 972 /** 973 * Called when the inputFilter of text is set. 974 * 975 * @param { ResourceStr } value 976 * @param { function } error 977 * @returns { TextAreaAttribute } 978 * @syscap SystemCapability.ArkUI.ArkUI.Full 979 * @crossplatform 980 * @atomicservice 981 * @since 11 982 */ 983 inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; 984 985 /** 986 * Define the caret style of the text input 987 * 988 * @param { CaretStyle } value 989 * @returns { TextAreaAttribute } 990 * @syscap SystemCapability.ArkUI.ArkUI.Full 991 * @crossplatform 992 * @atomicservice 993 * @since 12 994 */ 995 caretStyle(value: CaretStyle): TextAreaAttribute; 996 997 /** 998 * Define the text selected background color of the text input. 999 * 1000 * @param { ResourceColor } value 1001 * @returns { TextAreaAttribute } 1002 * @syscap SystemCapability.ArkUI.ArkUI.Full 1003 * @crossplatform 1004 * @atomicservice 1005 * @since 12 1006 */ 1007 selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; 1008 1009 /** 1010 * Called when submitted. 1011 * 1012 * @param { function } callback 1013 * @returns { TextAreaAttribute } 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @since 11 1017 */ 1018 /** 1019 * Called when submitted. 1020 * 1021 * @param { function } callback 1022 * @returns { TextAreaAttribute } 1023 * @syscap SystemCapability.ArkUI.ArkUI.Full 1024 * @crossplatform 1025 * @atomicservice 1026 * @since 12 1027 */ 1028 onSubmit(callback: (enterKey: EnterKeyType) => void): TextAreaAttribute; 1029 /** 1030 * Called when submitted. 1031 * 1032 * @param { TextAreaSubmitCallback } callback - callback of the listened event. 1033 * @returns { TextAreaAttribute } 1034 * @syscap SystemCapability.ArkUI.ArkUI.Full 1035 * @crossplatform 1036 * @atomicservice 1037 * @since 14 1038 */ 1039 onSubmit(callback: TextAreaSubmitCallback): TextAreaAttribute; 1040 1041 /** 1042 * Called when the input changes. 1043 * 1044 * @param { function } callback 1045 * @returns { TextAreaAttribute } 1046 * @syscap SystemCapability.ArkUI.ArkUI.Full 1047 * @since 7 1048 */ 1049 /** 1050 * Called when the input changes. 1051 * 1052 * @param { function } callback 1053 * @returns { TextAreaAttribute } 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @crossplatform 1056 * @since 10 1057 */ 1058 /** 1059 * Called when the input changes. 1060 * 1061 * @param { function } callback 1062 * @returns { TextAreaAttribute } 1063 * @syscap SystemCapability.ArkUI.ArkUI.Full 1064 * @crossplatform 1065 * @atomicservice 1066 * @since 11 1067 */ 1068 /** 1069 * Called when the input changes. 1070 * 1071 * @param { EditableTextOnChangeCallback } callback 1072 * @returns { TextAreaAttribute } 1073 * @syscap SystemCapability.ArkUI.ArkUI.Full 1074 * @crossplatform 1075 * @atomicservice 1076 * @since 12 1077 */ 1078 onChange(callback: EditableTextOnChangeCallback): TextAreaAttribute; 1079 1080 /** 1081 * Called when the text selection changes. 1082 * 1083 * @param { function } callback - callback of the listened event. 1084 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1085 * @syscap SystemCapability.ArkUI.ArkUI.Full 1086 * @crossplatform 1087 * @since 10 1088 */ 1089 /** 1090 * Called when the text selection changes. 1091 * 1092 * @param { function } callback - callback of the listened event. 1093 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1094 * @syscap SystemCapability.ArkUI.ArkUI.Full 1095 * @crossplatform 1096 * @atomicservice 1097 * @since 11 1098 */ 1099 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; 1100 1101 /** 1102 * Called when the content scrolls. 1103 * 1104 * @param { function } callback - callback of the listened event. 1105 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1106 * @syscap SystemCapability.ArkUI.ArkUI.Full 1107 * @crossplatform 1108 * @since 10 1109 */ 1110 /** 1111 * Called when the content scrolls. 1112 * 1113 * @param { function } callback - callback of the listened event. 1114 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1115 * @syscap SystemCapability.ArkUI.ArkUI.Full 1116 * @crossplatform 1117 * @atomicservice 1118 * @since 11 1119 */ 1120 onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; 1121 1122 /** 1123 * Called when judging whether the text editing change finished. 1124 * 1125 * @param { function } callback - Triggered when the text area status changes. 1126 * If the value of isEditing is true, text area is in progress. 1127 * @returns { TextAreaAttribute } 1128 * @syscap SystemCapability.ArkUI.ArkUI.Full 1129 * @crossplatform 1130 * @since 10 1131 */ 1132 /** 1133 * Called when judging whether the text editing change finished. 1134 * 1135 * @param { function } callback - Triggered when the text area status changes. 1136 * If the value of isEditing is true, text area is in progress. 1137 * @returns { TextAreaAttribute } 1138 * @syscap SystemCapability.ArkUI.ArkUI.Full 1139 * @crossplatform 1140 * @atomicservice 1141 * @since 11 1142 */ 1143 onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; 1144 1145 /** 1146 * Called when using the Clipboard menu 1147 * 1148 * @param { function } callback 1149 * @returns { TextAreaAttribute } 1150 * @syscap SystemCapability.ArkUI.ArkUI.Full 1151 * @since 8 1152 */ 1153 /** 1154 * Called when using the Clipboard menu 1155 * 1156 * @param { function } callback 1157 * @returns { TextAreaAttribute } 1158 * @syscap SystemCapability.ArkUI.ArkUI.Full 1159 * @crossplatform 1160 * @since 10 1161 */ 1162 /** 1163 * Called when using the Clipboard menu 1164 * 1165 * @param { function } callback 1166 * @returns { TextAreaAttribute } 1167 * @syscap SystemCapability.ArkUI.ArkUI.Full 1168 * @crossplatform 1169 * @atomicservice 1170 * @since 11 1171 */ 1172 onCopy(callback: (value: string) => void): TextAreaAttribute; 1173 1174 /** 1175 * Called when using the Clipboard menu 1176 * 1177 * @param { function } callback 1178 * @returns { TextAreaAttribute } 1179 * @syscap SystemCapability.ArkUI.ArkUI.Full 1180 * @since 8 1181 */ 1182 /** 1183 * Called when using the Clipboard menu 1184 * 1185 * @param { function } callback 1186 * @returns { TextAreaAttribute } 1187 * @syscap SystemCapability.ArkUI.ArkUI.Full 1188 * @crossplatform 1189 * @since 10 1190 */ 1191 /** 1192 * Called when using the Clipboard menu 1193 * 1194 * @param { function } callback 1195 * @returns { TextAreaAttribute } 1196 * @syscap SystemCapability.ArkUI.ArkUI.Full 1197 * @crossplatform 1198 * @atomicservice 1199 * @since 11 1200 */ 1201 onCut(callback: (value: string) => void): TextAreaAttribute; 1202 1203 /** 1204 * Called when using the Clipboard menu 1205 * 1206 * @param { function } callback 1207 * @returns { TextAreaAttribute } 1208 * @syscap SystemCapability.ArkUI.ArkUI.Full 1209 * @since 7 1210 */ 1211 /** 1212 * Called when using the Clipboard menu 1213 * 1214 * @param { function } callback 1215 * @returns { TextAreaAttribute } 1216 * @syscap SystemCapability.ArkUI.ArkUI.Full 1217 * @crossplatform 1218 * @since 10 1219 */ 1220 /** 1221 * Called when using the Clipboard menu 1222 * 1223 * @param { function } callback 1224 * Executed when a paste operation is performed. 1225 * { string } value - The text content to be pasted. 1226 * { PasteEvent } event - The user-defined paste event. 1227 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1228 * @syscap SystemCapability.ArkUI.ArkUI.Full 1229 * @crossplatform 1230 * @atomicservice 1231 * @since 11 1232 */ 1233 onPaste(callback: (value: string, event: PasteEvent) => void): TextAreaAttribute; 1234 1235 /** 1236 * Called when the copy option is set. 1237 * 1238 * @param { CopyOptions } value 1239 * @returns { TextAreaAttribute } 1240 * @syscap SystemCapability.ArkUI.ArkUI.Full 1241 * @since 9 1242 */ 1243 /** 1244 * Called when the copy option is set. 1245 * 1246 * @param { CopyOptions } value 1247 * @returns { TextAreaAttribute } 1248 * @syscap SystemCapability.ArkUI.ArkUI.Full 1249 * @crossplatform 1250 * @since 10 1251 */ 1252 /** 1253 * Called when the copy option is set. 1254 * 1255 * @param { CopyOptions } value 1256 * @returns { TextAreaAttribute } 1257 * @syscap SystemCapability.ArkUI.ArkUI.Full 1258 * @crossplatform 1259 * @atomicservice 1260 * @since 11 1261 */ 1262 copyOption(value: CopyOptions): TextAreaAttribute; 1263 1264 /** 1265 * Sets whether request keyboard or not when on focus. 1266 * 1267 * @param { boolean } value 1268 * @returns { TextAreaAttribute } Returns the instance of the TextAreaAttribute. 1269 * @syscap SystemCapability.ArkUI.ArkUI.Full 1270 * @crossplatform 1271 * @since 10 1272 */ 1273 /** 1274 * Sets whether request keyboard or not when on focus. 1275 * 1276 * @param { boolean } value 1277 * @returns { TextAreaAttribute } Returns the instance of the TextAreaAttribute. 1278 * @syscap SystemCapability.ArkUI.ArkUI.Full 1279 * @crossplatform 1280 * @atomicservice 1281 * @since 11 1282 */ 1283 enableKeyboardOnFocus(value: boolean): TextAreaAttribute; 1284 1285 /** 1286 * Define the max length content of the text area. 1287 * 1288 * @param { number } value 1289 * @returns { TextAreaAttribute } 1290 * @syscap SystemCapability.ArkUI.ArkUI.Full 1291 * @since 10 1292 */ 1293 /** 1294 * Define the max length content of the text area. 1295 * 1296 * @param { number } value 1297 * @returns { TextAreaAttribute } 1298 * @syscap SystemCapability.ArkUI.ArkUI.Full 1299 * @crossplatform 1300 * @atomicservice 1301 * @since 11 1302 */ 1303 maxLength(value: number): TextAreaAttribute; 1304 1305 /** 1306 * Define show counter of the text area. 1307 * 1308 * @param { boolean } value 1309 * @returns { TextAreaAttribute } 1310 * @syscap SystemCapability.ArkUI.ArkUI.Full 1311 * @since 10 1312 */ 1313 /** 1314 * Define show counter of the text area. 1315 * 1316 * @param { boolean } value - Set showcounter of the text area. 1317 * @param { InputCounterOptions } options - Set the percentage of counter. 1318 * @returns { TextAreaAttribute } 1319 * @syscap SystemCapability.ArkUI.ArkUI.Full 1320 * @crossplatform 1321 * @atomicservice 1322 * @since 11 1323 */ 1324 showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; 1325 1326 /** 1327 * Define style of the text area. 1328 * 1329 * @param { TextContentStyle } value 1330 * @returns { TextAreaAttribute } 1331 * @syscap SystemCapability.ArkUI.ArkUI.Full 1332 * @since 10 1333 */ 1334 /** 1335 * Define style of the text area. 1336 * 1337 * @param { TextContentStyle } value 1338 * @returns { TextAreaAttribute } 1339 * @syscap SystemCapability.ArkUI.ArkUI.Full 1340 * @crossplatform 1341 * @atomicservice 1342 * @since 11 1343 */ 1344 style(value: TextContentStyle): TextAreaAttribute; 1345 1346 /** 1347 * Define bar state of the text area. 1348 * 1349 * @param { BarState } value 1350 * @returns { TextAreaAttribute } 1351 * @syscap SystemCapability.ArkUI.ArkUI.Full 1352 * @since 10 1353 */ 1354 /** 1355 * Define bar state of the text area. 1356 * 1357 * @param { BarState } value 1358 * @returns { TextAreaAttribute } 1359 * @syscap SystemCapability.ArkUI.ArkUI.Full 1360 * @atomicservice 1361 * @since 11 1362 */ 1363 barState(value: BarState): TextAreaAttribute; 1364 1365 /** 1366 * Controls whether the selection menu pops up. 1367 * 1368 * @param { boolean } value 1369 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1370 * @syscap SystemCapability.ArkUI.ArkUI.Full 1371 * @crossplatform 1372 * @since 10 1373 */ 1374 /** 1375 * Controls whether the selection menu pops up. 1376 * 1377 * @param { boolean } value 1378 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1379 * @syscap SystemCapability.ArkUI.ArkUI.Full 1380 * @crossplatform 1381 * @atomicservice 1382 * @since 11 1383 */ 1384 selectionMenuHidden(value: boolean): TextAreaAttribute; 1385 1386 /** 1387 * Called when the minimum font size of the font is set. 1388 * 1389 * @param { number | string | Resource } value 1390 * @returns { TextAreaAttribute } 1391 * @syscap SystemCapability.ArkUI.ArkUI.Full 1392 * @crossplatform 1393 * @atomicservice 1394 * @since 12 1395 */ 1396 minFontSize(value: number | string | Resource): TextAreaAttribute; 1397 1398 /** 1399 * Called when the maximum font size of the font is set. 1400 * 1401 * @param { number | string | Resource } value 1402 * @returns { TextAreaAttribute } 1403 * @syscap SystemCapability.ArkUI.ArkUI.Full 1404 * @crossplatform 1405 * @atomicservice 1406 * @since 12 1407 */ 1408 maxFontSize(value: number | string | Resource): TextAreaAttribute; 1409 1410 /** 1411 * Called when the height adaptive policy is set. 1412 * 1413 * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. 1414 * @returns { TextAreaAttribute } 1415 * @syscap SystemCapability.ArkUI.ArkUI.Full 1416 * @crossplatform 1417 * @atomicservice 1418 * @since 12 1419 */ 1420 heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAreaAttribute; 1421 1422 /** 1423 * Define max lines of the text area. 1424 * 1425 * @param { number } value 1426 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1427 * @syscap SystemCapability.ArkUI.ArkUI.Full 1428 * @since 10 1429 */ 1430 /** 1431 * Define max lines of the text area. 1432 * 1433 * @param { number } value 1434 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1435 * @syscap SystemCapability.ArkUI.ArkUI.Full 1436 * @crossplatform 1437 * @atomicservice 1438 * @since 11 1439 */ 1440 maxLines(value: number): TextAreaAttribute; 1441 1442 /** 1443 * Set the word break type. 1444 * 1445 * @param { WordBreak } value - The word break type. 1446 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1447 * @syscap SystemCapability.ArkUI.ArkUI.Full 1448 * @crossplatform 1449 * @atomicservice 1450 * @since 12 1451 */ 1452 wordBreak(value: WordBreak): TextAreaAttribute; 1453 1454 /** 1455 * Set the text line break strategy type. 1456 * 1457 * @param { LineBreakStrategy } strategy - The text line break strategy type. 1458 * @returns { TextAreaAttribute } The attribute of the TextAreaAttribute. 1459 * @syscap SystemCapability.ArkUI.ArkUI.Full 1460 * @crossplatform 1461 * @atomicservice 1462 * @since 12 1463 */ 1464 lineBreakStrategy(strategy: LineBreakStrategy): TextAreaAttribute; 1465 1466 /** 1467 * Define custom keyboard of the text area. 1468 * 1469 * @param { CustomBuilder } value 1470 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1471 * @syscap SystemCapability.ArkUI.ArkUI.Full 1472 * @since 10 1473 */ 1474 /** 1475 * Define custom keyboard of the text area. 1476 * 1477 * @param { CustomBuilder } value 1478 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1479 * @syscap SystemCapability.ArkUI.ArkUI.Full 1480 * @crossplatform 1481 * @atomicservice 1482 * @since 11 1483 */ 1484 /** 1485 * Define custom keyboard of the text area. 1486 * 1487 * @param { CustomBuilder } value - Set up a custom keyboard of TextArea 1488 * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of TextArea 1489 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1490 * @syscap SystemCapability.ArkUI.ArkUI.Full 1491 * @crossplatform 1492 * @atomicservice 1493 * @since 12 1494 */ 1495 customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; 1496 1497 /** 1498 * Called when the text decoration of the text is set. 1499 * 1500 * @param { TextDecorationOptions } value 1501 * @returns { TextAreaAttribute } 1502 * @syscap SystemCapability.ArkUI.ArkUI.Full 1503 * @crossplatform 1504 * @atomicservice 1505 * @since 12 1506 */ 1507 decoration(value: TextDecorationOptions): TextAreaAttribute; 1508 1509 /** 1510 * Called when the distance between text fonts is set. 1511 * 1512 * @param { number | string | Resource } value 1513 * @returns { TextAreaAttribute } 1514 * @syscap SystemCapability.ArkUI.ArkUI.Full 1515 * @crossplatform 1516 * @atomicservice 1517 * @since 12 1518 */ 1519 letterSpacing(value: number | string | Resource): TextAreaAttribute; 1520 1521 /** 1522 * Set font line spacing. 1523 * 1524 * @param { LengthMetrics } value 1525 * @returns { TextAreaAttribute } 1526 * @syscap SystemCapability.ArkUI.ArkUI.Full 1527 * @crossplatform 1528 * @atomicservice 1529 * @since 12 1530 */ 1531 lineSpacing(value: LengthMetrics): TextAreaAttribute; 1532 1533 /** 1534 * Called when the line height of the font is set. 1535 * 1536 * @param { number | string | Resource } value 1537 * @returns { TextAreaAttribute } 1538 * @syscap SystemCapability.ArkUI.ArkUI.Full 1539 * @crossplatform 1540 * @atomicservice 1541 * @since 12 1542 */ 1543 lineHeight(value: number | string | Resource): TextAreaAttribute; 1544 1545 /** 1546 * Called when the input type is set. 1547 * 1548 * @param { TextAreaType } value 1549 * @returns { TextAreaAttribute } 1550 * @syscap SystemCapability.ArkUI.ArkUI.Full 1551 * @crossplatform 1552 * @since 11 1553 */ 1554 /** 1555 * Called when the input type is set. 1556 * 1557 * @param { TextAreaType } value 1558 * @returns { TextAreaAttribute } 1559 * @syscap SystemCapability.ArkUI.ArkUI.Full 1560 * @crossplatform 1561 * @atomicservice 1562 * @since 12 1563 */ 1564 type(value: TextAreaType): TextAreaAttribute; 1565 1566 /** 1567 * Sets whether enable auto fill or not. 1568 * 1569 * @param { boolean } value - Indicates the flag whether autofill is enabled. 1570 * @returns { TextAreaAttribute } 1571 * @syscap SystemCapability.ArkUI.ArkUI.Full 1572 * @atomicservice 1573 * @since 12 1574 */ 1575 enableAutoFill(value: boolean): TextAreaAttribute; 1576 1577 /** 1578 * Called when the auto fill type is set. 1579 * 1580 * @param { ContentType } contentType - Indicates autofill type. 1581 * @returns { TextAreaAttribute } 1582 * @syscap SystemCapability.ArkUI.ArkUI.Full 1583 * @atomicservice 1584 * @since 12 1585 */ 1586 contentType(contentType: ContentType): TextAreaAttribute; 1587 1588 /** 1589 * Set font feature. 1590 * 1591 * @param { string } value - The fontFeature. 1592 * normal | <feature-tag-value>, 1593 * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 1594 * the values of <feature-tag-value> reference to doc of TextArea component 1595 * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 1596 * @returns { TextAreaAttribute } 1597 * @syscap SystemCapability.ArkUI.ArkUI.Full 1598 * @crossplatform 1599 * @atomicservice 1600 * @since 12 1601 */ 1602 fontFeature(value: string): TextAreaAttribute; 1603 1604 /** 1605 * Get text value information when about to input. 1606 * 1607 * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert. 1608 * @returns { TextAreaAttribute } 1609 * @syscap SystemCapability.ArkUI.ArkUI.Full 1610 * @crossplatform 1611 * @atomicservice 1612 * @since 12 1613 */ 1614 onWillInsert(callback: Callback<InsertValue, boolean>): TextAreaAttribute; 1615 1616 /** 1617 * Get text value information when completed input. 1618 * 1619 * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted. 1620 * @returns { TextAreaAttribute } 1621 * @syscap SystemCapability.ArkUI.ArkUI.Full 1622 * @crossplatform 1623 * @atomicservice 1624 * @since 12 1625 */ 1626 onDidInsert(callback: Callback<InsertValue>): TextAreaAttribute; 1627 1628 /** 1629 * Get text value information when about to delete. 1630 * 1631 * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete. 1632 * @returns { TextAreaAttribute } 1633 * @syscap SystemCapability.ArkUI.ArkUI.Full 1634 * @crossplatform 1635 * @atomicservice 1636 * @since 12 1637 */ 1638 onWillDelete(callback: Callback<DeleteValue, boolean>): TextAreaAttribute; 1639 1640 /** 1641 * Get text value information when the deletion has been completed 1642 * 1643 * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted. 1644 * @returns { TextAreaAttribute } 1645 * @syscap SystemCapability.ArkUI.ArkUI.Full 1646 * @crossplatform 1647 * @atomicservice 1648 * @since 12 1649 */ 1650 onDidDelete(callback: Callback<DeleteValue>): TextAreaAttribute; 1651 1652 /** 1653 * Set the custom text menu. 1654 * 1655 * @param { EditMenuOptions } editMenu - Customize text menu options. 1656 * @returns { TextAreaAttribute } 1657 * @syscap SystemCapability.ArkUI.ArkUI.Full 1658 * @crossplatform 1659 * @atomicservice 1660 * @since 12 1661 */ 1662 editMenuOptions(editMenu: EditMenuOptions): TextAreaAttribute; 1663 1664 /** 1665 * Define the preview text mode of the text input. 1666 * 1667 * @param { boolean } enable - Indicates the preview text mode. 1668 * @returns { TextAreaAttribute } 1669 * @syscap SystemCapability.ArkUI.ArkUI.Full 1670 * @crossplatform 1671 * @atomicservice 1672 * @since 12 1673 */ 1674 enablePreviewText(enable: boolean): TextAreaAttribute; 1675 1676 /** 1677 * Enable or disable haptic feedback. 1678 * 1679 * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. 1680 * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. 1681 * @syscap SystemCapability.ArkUI.ArkUI.Full 1682 * @crossplatform 1683 * @atomicservice 1684 * @since 13 1685 */ 1686 enableHapticFeedback(isEnabled: boolean): TextAreaAttribute; 1687} 1688 1689/** 1690 * Defines TextArea Component. 1691 * 1692 * @syscap SystemCapability.ArkUI.ArkUI.Full 1693 * @since 7 1694 */ 1695/** 1696 * Defines TextArea Component. 1697 * 1698 * @syscap SystemCapability.ArkUI.ArkUI.Full 1699 * @crossplatform 1700 * @since 10 1701 */ 1702/** 1703 * Defines TextArea Component. 1704 * 1705 * @syscap SystemCapability.ArkUI.ArkUI.Full 1706 * @crossplatform 1707 * @atomicservice 1708 * @since 11 1709 */ 1710declare const TextArea: TextAreaInterface; 1711 1712/** 1713 * Defines TextArea Component instance. 1714 * 1715 * @syscap SystemCapability.ArkUI.ArkUI.Full 1716 * @since 7 1717 */ 1718/** 1719 * Defines TextArea Component instance. 1720 * 1721 * @syscap SystemCapability.ArkUI.ArkUI.Full 1722 * @crossplatform 1723 * @since 10 1724 */ 1725/** 1726 * Defines TextArea Component instance. 1727 * 1728 * @syscap SystemCapability.ArkUI.ArkUI.Full 1729 * @crossplatform 1730 * @atomicservice 1731 * @since 11 1732 */ 1733declare const TextAreaInstance: TextAreaAttribute; 1734