From 6c23ad95cdedc04a75ee1de1ca390286ab22e127 Mon Sep 17 00:00:00 2001 From: yao_qiaoming1 Date: Wed, 20 Aug 2025 18:19:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[RichEditor]=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yao_qiaoming1 --- api/arkui/component/richEditor.static.d.ets | 46 +++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/api/arkui/component/richEditor.static.d.ets b/api/arkui/component/richEditor.static.d.ets index d425043dc1..cbc2d334b9 100644 --- a/api/arkui/component/richEditor.static.d.ets +++ b/api/arkui/component/richEditor.static.d.ets @@ -1803,6 +1803,15 @@ export declare interface RichEditorAttribute extends CommonMethod { * @since 20 */ default onReady(callback: VoidCallback | undefined): this; + /** + * Called when on ready. + * + * @param { Callback | undefined } callback - The triggered function when rich editor is ready. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onReady(callback: Callback | undefined): this; /** * Called when the content is selected. * @@ -1870,6 +1879,15 @@ export declare interface RichEditorAttribute extends CommonMethod { * @since 20 */ default onDeleteComplete(callback: VoidCallback | undefined): this; + /** + * Notify that the deletion has been completed + * + * @param { Callback | undefined } callback - The triggered function when text content has been deleted. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default onDeleteComplete(ccallback: Callback | undefined): this; /** * Allow replication. * @@ -2071,7 +2089,7 @@ export declare interface RichEditorAttribute extends CommonMethod { /** * Define the max length content of the richEditor. * - * @param { Optional } maxLength - The maximun length content of the richEditor. + * @param { number | undefined } maxLength - The maximun length content of the richEditor. * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -2080,7 +2098,7 @@ export declare interface RichEditorAttribute extends CommonMethod { /** * Define max lines of the richEditor. * - * @param { Optional } maxLines - The maximun Lines of the richEditor. + * @param { number | undefined } maxLines - The maximun Lines of the richEditor. * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -2089,7 +2107,7 @@ export declare interface RichEditorAttribute extends CommonMethod { /** * Set the keyboard appearance. * - * @param { Optional } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE + * @param { KeyboardAppearance | undefined } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -2098,7 +2116,7 @@ export declare interface RichEditorAttribute extends CommonMethod { /** * Set whether stop backPressed callback event or not. * - * @param { Optional } isStopped - Default value is true, set false to trigger the latest callback event. + * @param { boolean | undefined } isStopped - Default value is true, set false to trigger the latest callback event. * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 @@ -2114,6 +2132,26 @@ export declare interface RichEditorAttribute extends CommonMethod { */ default attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; + /** + * Whether to enable automatic spacing between Chinese and Latin characters. + * + * @param { boolean | undefined } enable - The default value is false, indicates the flag whether to enable + * automatic spacing. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default enableAutoSpacing(enable: boolean | undefined): this; + /** + * Set undo style. + * + * @param { boolean | undefined } style - Default value is UndoStyle.CLEAR_STYLE. + * automatic spacing. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + default undoStyle(style: UndoStyle | undefined): this; } /** * the callback of cut event. -- Gitee From 713e0a19c24b460b05f6e754d53d7d6ad5728b1b Mon Sep 17 00:00:00 2001 From: yao_qiaoming1 Date: Fri, 29 Aug 2025 15:42:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[RichEditor]=E5=A2=9E=E5=8A=A0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yao_qiaoming1 --- api/arkui/component/richEditor.static.d.ets | 44 ++++++++++++--------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/api/arkui/component/richEditor.static.d.ets b/api/arkui/component/richEditor.static.d.ets index cbc2d334b9..b5df4f83e5 100644 --- a/api/arkui/component/richEditor.static.d.ets +++ b/api/arkui/component/richEditor.static.d.ets @@ -136,6 +136,30 @@ export declare enum RichEditorResponseType { */ DEFAULT = 3 } +/** + * Defines undo style. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum UndoStyle { + /** + * Undo without style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CLEAR_STYLE = 0, + + /** + * Undo keep style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + KEEP_STYLE = 1, +} /** * Defines the span position. * @@ -1803,15 +1827,6 @@ export declare interface RichEditorAttribute extends CommonMethod { * @since 20 */ default onReady(callback: VoidCallback | undefined): this; - /** - * Called when on ready. - * - * @param { Callback | undefined } callback - The triggered function when rich editor is ready. - * @returns { RichEditorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - default onReady(callback: Callback | undefined): this; /** * Called when the content is selected. * @@ -1879,15 +1894,6 @@ export declare interface RichEditorAttribute extends CommonMethod { * @since 20 */ default onDeleteComplete(callback: VoidCallback | undefined): this; - /** - * Notify that the deletion has been completed - * - * @param { Callback | undefined } callback - The triggered function when text content has been deleted. - * @returns { RichEditorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 20 - */ - default onDeleteComplete(ccallback: Callback | undefined): this; /** * Allow replication. * @@ -2145,7 +2151,7 @@ export declare interface RichEditorAttribute extends CommonMethod { /** * Set undo style. * - * @param { boolean | undefined } style - Default value is UndoStyle.CLEAR_STYLE. + * @param { UndoStyle | undefined } style - Default value is UndoStyle.CLEAR_STYLE. * automatic spacing. * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full -- Gitee