diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json
index bfdf91ad709e0a08577330527ed9210eeeab5660..ddc90f6ad25d3fd4f8d748d93f120beb50c735ca 100644
--- a/arkui/ace_engine/native/libace.ndk.json
+++ b/arkui/ace_engine/native/libace.ndk.json
@@ -2509,5 +2509,9 @@
{
"first_introduced": "15",
"name": "OH_ArkUI_UnregisterDrawCallbackOnNodeHandle"
+ },
+ {
+ "first_introduced": "15",
+ "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent"
}
]
\ No newline at end of file
diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h
index 9269cb8d375f1b23d021870b72942fbd07b36b1b..47b92dabf5e138983aa1a5dbbc340079027599c3 100644
--- a/arkui/ace_engine/native/native_node.h
+++ b/arkui/ace_engine/native/native_node.h
@@ -2980,6 +2980,34 @@ typedef enum {
*/
NODE_TEXT_INPUT_NUMBER_OF_LINES,
+ /**
+ * @brief Sets the letter spacing of the TextInput component.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ *
+ * @since 15
+ */
+ NODE_TEXT_INPUT_LETTER_SPACING = 7032,
+
+ /**
+ * @brief Sets whether to enable preview text for the TextInput component.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ *
+ * @since 15
+ */
+ NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033,
+
/**
* @brief Set the keyboard style of textInput
*
@@ -3288,6 +3316,35 @@ typedef enum {
*
*/
NODE_TEXT_AREA_NUMBER_OF_LINES,
+
+ /**
+ * @brief Sets the letter spacing of the TextArea component.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ *
+ * @since 15
+ */
+ NODE_TEXT_AREA_LETTER_SPACING = 8023,
+
+ /**
+ * @brief Sets whether to enable preview text for the TextArea component.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ *
+ * @since 15
+ */
+ NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024,
+
/**
* @brief Set the keyboard style of textArea
*
@@ -5608,6 +5665,20 @@ typedef struct {
const char* pStr;
} ArkUI_StringAsyncEvent;
+/**
+ * @brief Defines a hybrid data structure for component events.
+ *
+ * @since 15
+ */
+ typedef struct {
+ /** String data */
+ const char* pStr;
+ /** Extended string data */
+ const char* pExtendStr;
+ /** Numeric data */
+ int32_t number;
+} ArkUI_TextChangeEvent;
+
/**
* @brief Enumerates the event types supported by the NativeNode component.
*
@@ -6121,6 +6192,20 @@ typedef enum {
*/
NODE_TEXT_INPUT_ON_DID_DELETE = 7012,
+ /**
+ * @brief Defines the event triggered when content (including preview text) changes in the TextInput
+ * component.
+ *
+ * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n
+ * {@link ArkUI_TextChangeEvent} contains the following parameters: \n
+ * ArkUI_TextChangeEvent.pStr: content in the TextInput component.
+ * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component.
+ * ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component.
+ *
+ * @since 15
+ */
+ NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013,
+
/**
* @brief Defines the event triggered when the input in the text box changes.
*
@@ -6273,6 +6358,20 @@ typedef enum {
*/
NODE_TEXT_AREA_ON_DID_DELETE = 8011,
+ /**
+ * @brief Defines the event triggered when content (including preview text) changes in the TextArea
+ * component.
+ *
+ * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n
+ * {@link ArkUI_TextChangeEvent} contains the following parameters: \n
+ * ArkUI_TextChangeEvent.pStr: content in the TextArea component.
+ * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component.
+ * ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component.
+ *
+ * @since 15
+ */
+ NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012,
+
/**
* @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes.
*
@@ -6847,6 +6946,15 @@ ArkUI_NodeComponentEvent* OH_ArkUI_NodeEvent_GetNodeComponentEvent(ArkUI_NodeEve
*/
ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* event);
+/**
+ * @brief Obtains the ArkUI_TextChangeEvent data from a component event.
+ *
+ * @param event Pointer to a component event. It cannot be null.
+ * @return Returns the pointer to the ArkUI_TextChangeEvent object.
+ * @since 15
+ */
+ ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event);
+
/**
* @brief Obtains the custom data in a component event.
*