diff --git a/api/@internal/component/ets/rich_editor.d.ts b/api/@internal/component/ets/rich_editor.d.ts index 9ebb1c2f8c62bb09565051790d1894b2a144012d..c1edbafab9ab55619a6a477e3db3f444d352f089 100644 --- a/api/@internal/component/ets/rich_editor.d.ts +++ b/api/@internal/component/ets/rich_editor.d.ts @@ -18,21 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font, VoidCallback } from './units'; -import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums'; -import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString'; -import { Resource } from './../../../api/global/resource'; -import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; -import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon'; -import { GestureEvent } from './gesture'; -import { EnterKeyType, SubmitEvent } from './textInput'; -import { LengthMetrics , ColorMetrics } from '../Graphics'; -import { TextBackgroundStyle } from "./span"; -/*** endif */ - /** * Defines delete text direction. * @@ -47,8 +32,7 @@ import { TextBackgroundStyle } from "./span"; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum RichEditorDeleteDirection { /** @@ -63,8 +47,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ BACKWARD, @@ -80,8 +63,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ FORWARD, } @@ -100,8 +82,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum RichEditorSpanType { /** @@ -116,8 +97,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ TEXT = 0, @@ -133,8 +113,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ IMAGE = 1, @@ -150,8 +129,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ MIXED = 2, @@ -161,8 +139,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BUILDER = 3, @@ -172,8 +149,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT = 4, } @@ -224,8 +200,7 @@ declare enum UndoStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum RichEditorResponseType { /** @@ -241,8 +216,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ RIGHT_CLICK = 0, @@ -259,8 +233,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LONG_PRESS = 1, @@ -277,8 +250,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SELECT = 2, @@ -288,8 +260,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT = 3, } @@ -308,8 +279,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSpanPosition { /** @@ -326,8 +296,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanIndex: number; @@ -345,8 +314,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanRange: [number, number]; } @@ -365,8 +333,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextStyle { /** @@ -383,8 +350,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor?: ResourceColor; @@ -402,8 +368,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize?: Length | number; @@ -421,8 +386,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle?: FontStyle; @@ -440,8 +404,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight?: number | FontWeight | string; @@ -459,8 +422,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily?: ResourceStr; @@ -487,8 +449,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration?: DecorationStyleInterface; @@ -507,8 +468,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow?: ShadowOptions | Array; @@ -519,8 +479,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing?: number | string; @@ -531,8 +490,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight?: number | string | Resource; @@ -543,8 +501,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading?: boolean; @@ -560,8 +517,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature?: string; @@ -572,8 +528,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -594,8 +549,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface LeadingMarginPlaceholder { /** @@ -613,8 +567,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pixelMap: PixelMap; @@ -633,8 +586,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size: [Dimension, Dimension]; } @@ -654,8 +606,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphStyle { /** @@ -673,8 +624,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textAlign?: TextAlign; @@ -704,8 +654,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ leadingMargin?: Dimension | LeadingMarginPlaceholder; @@ -716,8 +665,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak?: WordBreak; @@ -728,8 +676,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy?: LineBreakStrategy; @@ -740,8 +687,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ paragraphSpacing?: number; } @@ -753,8 +699,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface PasteEvent { /** @@ -804,8 +749,7 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpan { /** @@ -822,8 +766,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -841,8 +784,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: string; @@ -860,8 +802,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle?: RichEditorTextStyle; } @@ -881,8 +822,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface RichEditorLayoutStyle { /** @@ -900,8 +840,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ margin?: Dimension | Margin; @@ -920,8 +859,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderRadius?: Dimension | BorderRadiuses; } @@ -940,8 +878,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanStyle { /** @@ -958,8 +895,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: [Dimension, Dimension]; @@ -977,8 +913,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign?: ImageSpanAlignment; @@ -996,8 +931,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit?: ImageFit; @@ -1016,8 +950,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1037,8 +970,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanStyle { /** @@ -1056,8 +988,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSize?: number | string | Resource; @@ -1076,8 +1007,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor?: Array; @@ -1096,8 +1026,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontWeight?: number | FontWeight | string; @@ -1116,8 +1045,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ effectStrategy?: SymbolEffectStrategy; @@ -1136,8 +1064,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ renderingStrategy?: SymbolRenderingStrategy; } @@ -1156,8 +1083,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextStyleResult { /** @@ -1174,8 +1100,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor: ResourceColor; @@ -1193,8 +1118,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize: number; @@ -1212,8 +1136,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle: FontStyle; @@ -1231,8 +1154,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight: number; @@ -1250,8 +1172,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily: string; @@ -1278,8 +1199,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration: DecorationStyleResult; @@ -1290,8 +1210,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow?: Array; @@ -1302,8 +1221,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing?: number; @@ -1314,8 +1232,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight?: number; @@ -1326,8 +1243,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading?: boolean; @@ -1343,8 +1259,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature?: string; @@ -1355,8 +1270,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -1376,8 +1290,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphResult { /** @@ -1395,8 +1308,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style: RichEditorParagraphStyle; @@ -1415,8 +1327,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ range: [number, number]; } @@ -1436,8 +1347,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanStyleResult { /** @@ -1455,8 +1365,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSize: number | string | Resource; @@ -1475,8 +1384,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor: Array; @@ -1495,8 +1403,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontWeight: number | FontWeight | string; @@ -1515,8 +1422,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ effectStrategy: SymbolEffectStrategy; @@ -1535,8 +1441,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ renderingStrategy: SymbolRenderingStrategy; } @@ -1555,8 +1460,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpanResult { /** @@ -1573,8 +1477,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1592,8 +1495,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: string; @@ -1611,8 +1513,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle: RichEditorTextStyleResult; @@ -1630,8 +1531,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetInSpan: [number, number]; @@ -1650,8 +1550,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolSpanStyle?: RichEditorSymbolSpanStyle; @@ -1670,8 +1569,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ valueResource?: Resource; @@ -1682,8 +1580,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paragraphStyle?: RichEditorParagraphStyle; @@ -1694,8 +1591,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ previewText?: string; @@ -1706,8 +1602,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -1726,8 +1621,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanStyleResult { /** @@ -1744,8 +1638,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size: [number, number]; @@ -1763,8 +1656,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign: ImageSpanAlignment; @@ -1782,8 +1674,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit: ImageFit; @@ -1794,8 +1685,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1814,8 +1704,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanResult { /** @@ -1832,8 +1721,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1851,8 +1739,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valuePixelMap?: PixelMap; @@ -1870,8 +1757,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valueResourceStr?: ResourceStr; @@ -1889,8 +1775,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle: RichEditorImageSpanStyleResult; @@ -1908,8 +1793,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetInSpan: [number, number]; } @@ -1928,8 +1812,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpan { /** @@ -1946,8 +1829,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1965,8 +1847,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: PixelMap | ResourceStr; @@ -1984,8 +1865,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle?: RichEditorImageSpanStyle; } @@ -2004,8 +1884,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorRange { /** @@ -2024,8 +1903,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ start?: number; @@ -2045,8 +1923,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ end?: number; } @@ -2066,8 +1943,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorGesture { /** @@ -2085,8 +1961,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onClick?: Callback; @@ -2105,8 +1980,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onLongPress?: Callback; @@ -2117,8 +1991,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @systemapi - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ onDoubleClick?: Callback; } @@ -2137,8 +2010,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpanOptions { /** @@ -2155,8 +2027,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: number; @@ -2174,8 +2045,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: RichEditorTextStyle; @@ -2194,8 +2064,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paragraphStyle?: RichEditorParagraphStyle; @@ -2214,8 +2083,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ gesture?: RichEditorGesture; @@ -2226,8 +2094,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -2239,8 +2106,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface KeyboardOptions { /** @@ -2250,8 +2116,7 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ supportAvoidance?: boolean; } @@ -2270,8 +2135,7 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanOptions { /** @@ -2288,8 +2152,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: number; @@ -2307,8 +2170,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle?: RichEditorImageSpanStyle; @@ -2327,8 +2189,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ gesture?: RichEditorGesture; @@ -2339,8 +2200,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ onHover?: OnHoverCallback; } @@ -2360,8 +2220,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorBuilderSpanOptions { /** @@ -2379,8 +2238,7 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset?: number; @@ -2390,8 +2248,7 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?ColorMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ dragBackgroundColor? : ColorMetrics; @@ -2401,8 +2258,7 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ isDragShadowNeeded?: boolean; } @@ -2414,8 +2270,7 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface PlaceholderStyle { /** @@ -2425,8 +2280,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ font?: Font; @@ -2437,8 +2291,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor?: ResourceColor; } @@ -2459,8 +2312,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } @@ -2481,8 +2333,7 @@ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { /** @@ -2500,8 +2351,7 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style: RichEditorParagraphStyle; } @@ -2522,8 +2372,7 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2540,8 +2389,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle: RichEditorTextStyle; @@ -2552,8 +2400,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -2574,8 +2421,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2592,8 +2438,7 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle: RichEditorImageSpanStyle; } @@ -2615,8 +2460,7 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2634,8 +2478,7 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolStyle: RichEditorSymbolSpanStyle; } @@ -2655,8 +2498,7 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanOptions { /** @@ -2674,8 +2516,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset?: number; @@ -2694,8 +2535,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: RichEditorSymbolSpanStyle; } @@ -2714,8 +2554,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSelection { /** @@ -2732,8 +2571,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selection: [number, number]; @@ -2751,8 +2589,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spans: Array; } @@ -2771,8 +2608,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorInsertValue { /** @@ -2789,8 +2625,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ insertOffset: number; @@ -2808,8 +2643,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ insertValue: string; @@ -2820,8 +2654,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ previewText?: string; } @@ -2840,8 +2673,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorDeleteValue { /** @@ -2858,8 +2690,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset: number; @@ -2877,8 +2708,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ direction: RichEditorDeleteDirection; @@ -2896,8 +2726,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ length: number; @@ -2915,8 +2744,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ richEditorDeleteSpans: Array; } @@ -2928,8 +2756,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorChangeValue { /** @@ -2939,8 +2766,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rangeBefore: TextRange; @@ -2951,8 +2777,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedSpans: Array; @@ -2963,8 +2788,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedImageSpans: Array; @@ -2975,8 +2799,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedSymbolSpans: Array; @@ -3006,8 +2829,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorOptions { /** @@ -3024,8 +2846,7 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller: RichEditorController; } @@ -3037,8 +2858,7 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorStyledStringOptions { /** @@ -3048,8 +2868,7 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ controller: RichEditorStyledStringController; } @@ -3069,8 +2888,7 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SelectionMenuOptions { /** @@ -3097,8 +2915,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onAppear?: MenuOnAppearCallback; @@ -3149,8 +2966,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ menuType?: MenuType; @@ -3161,8 +2977,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onMenuShow?: MenuCallback; @@ -3173,8 +2988,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onMenuHide?: MenuCallback; @@ -3184,8 +2998,7 @@ declare interface SelectionMenuOptions { * @type { ?PreviewMenuOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ previewMenuOptions?: PreviewMenuOptions; } @@ -3196,8 +3009,7 @@ declare interface SelectionMenuOptions { * @interface PreviewMenuOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PreviewMenuOptions { /** @@ -3206,8 +3018,7 @@ declare interface PreviewMenuOptions { * @type { ?HapticFeedbackMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ hapticFeedbackMode? : HapticFeedbackMode; } @@ -3219,8 +3030,7 @@ declare interface PreviewMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorBaseController implements TextEditControllerEx { /** @@ -3237,8 +3047,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getCaretOffset(): number; @@ -3258,8 +3067,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setCaretOffset(offset: number): boolean; @@ -3275,8 +3083,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closeSelectionMenu(): void; @@ -3295,8 +3102,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getTypingStyle(): RichEditorTextStyle; @@ -3315,8 +3121,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTypingStyle(value: RichEditorTextStyle): void; @@ -3349,8 +3154,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -3361,8 +3165,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEditing(): boolean; @@ -3372,8 +3175,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stopEditing(): void; @@ -3384,8 +3186,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getLayoutManager(): LayoutManager; @@ -3396,8 +3197,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getPreviewText(): PreviewText; @@ -3408,8 +3208,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getCaretRect(): RectResult | undefined; } @@ -3435,8 +3234,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorController extends RichEditorBaseController { /** @@ -3469,7 +3267,6 @@ declare class RichEditorController extends RichEditorBaseController { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number; @@ -3491,8 +3288,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number; @@ -3515,8 +3311,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number; @@ -3539,8 +3334,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number; @@ -3558,8 +3352,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void; @@ -3578,8 +3371,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ updateParagraphStyle(value: RichEditorParagraphStyleOptions): void; @@ -3597,8 +3389,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ deleteSpans(value?: RichEditorRange): void; @@ -3618,8 +3409,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getSpans(value?: RichEditorRange): Array; @@ -3640,8 +3430,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getParagraphs(value?: RichEditorRange): Array; @@ -3660,8 +3449,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getSelection(): RichEditorSelection; @@ -3675,8 +3463,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fromStyledString(value: StyledString): Array; @@ -3690,8 +3477,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ toStyledString(value: RichEditorRange): StyledString; } @@ -3703,8 +3489,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult; @@ -3716,8 +3501,7 @@ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController { /** @@ -3727,8 +3511,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setStyledString(styledString: StyledString): void; @@ -3748,7 +3531,6 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; @@ -3759,8 +3541,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getSelection(): RichEditorRange; @@ -3771,8 +3552,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onContentChanged(listener: StyledStringChangedListener): void; } @@ -3791,8 +3571,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RichEditorAttribute extends CommonMethod { /** @@ -3864,8 +3644,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSelect(callback: Callback): RichEditorAttribute; @@ -3877,8 +3656,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSelectionChange(callback: Callback): RichEditorAttribute; @@ -3908,8 +3686,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aboutToIMEInput(callback: Callback): RichEditorAttribute; @@ -3939,8 +3716,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onIMEInputComplete(callback: Callback): RichEditorAttribute; @@ -3952,8 +3728,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidIMEInput(callback: Callback): RichEditorAttribute; @@ -3983,8 +3758,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aboutToDelete(callback: Callback): RichEditorAttribute; @@ -4048,8 +3822,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOptions(value: CopyOptions): RichEditorAttribute; @@ -4076,8 +3849,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType, options?: SelectionMenuOptions): RichEditorAttribute; @@ -4109,8 +3881,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute; @@ -4131,8 +3902,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onPaste(callback: PasteEventCallback): RichEditorAttribute; @@ -4153,8 +3923,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableDataDetector(enable: boolean): RichEditorAttribute; @@ -4166,8 +3935,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): RichEditorAttribute; @@ -4188,8 +3956,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute; @@ -4202,8 +3969,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute; @@ -4215,8 +3981,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ caretColor(value: ResourceColor): RichEditorAttribute; @@ -4228,8 +3993,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): RichEditorAttribute; @@ -4241,8 +4005,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onEditingChange(callback: Callback): RichEditorAttribute; @@ -4254,8 +4017,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): RichEditorAttribute; @@ -4267,8 +4029,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSubmit(callback: SubmitCallback): RichEditorAttribute; @@ -4280,8 +4041,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillChange(callback: Callback) : RichEditorAttribute; @@ -4293,8 +4053,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute; @@ -4306,8 +4065,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onCut(callback: Callback): RichEditorAttribute; @@ -4319,8 +4077,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onCopy(callback: Callback): RichEditorAttribute; @@ -4332,8 +4089,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute; @@ -4345,8 +4101,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute; @@ -4358,8 +4113,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): RichEditorAttribute; @@ -4371,8 +4125,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ barState(state: BarState): RichEditorAttribute; @@ -4384,8 +4137,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ maxLength(maxLength: Optional): RichEditorAttribute; @@ -4397,8 +4149,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ maxLines(maxLines: Optional): RichEditorAttribute; @@ -4421,8 +4172,7 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): RichEditorAttribute; @@ -4433,8 +4183,7 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ stopBackPress(isStopped: Optional): RichEditorAttribute; @@ -4457,8 +4206,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CutEvent { /** @@ -4491,8 +4239,7 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CopyEvent { /** @@ -4525,8 +4272,7 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface RichEditorUrlStyle { /** @@ -4536,8 +4282,7 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ url?: ResourceStr; } @@ -4551,8 +4296,7 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -4565,8 +4309,7 @@ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => vo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type MenuOnAppearCallback = (start: number, end: number) => void; @@ -4579,8 +4322,7 @@ declare type MenuOnAppearCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare type MenuCallback = (start: number, end: number) => void; @@ -4592,8 +4334,7 @@ declare type MenuCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type PasteEventCallback = (event?: PasteEvent) => void; @@ -4606,8 +4347,7 @@ declare type PasteEventCallback = (event?: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; @@ -4625,8 +4365,8 @@ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RichEditorInterface { /** @@ -4645,8 +4385,7 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: RichEditorOptions): RichEditorAttribute; @@ -4658,8 +4397,7 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (options: RichEditorStyledStringOptions): RichEditorAttribute; } diff --git a/api/arkui/RichEditorModifier.static.d.ets b/api/arkui/RichEditorModifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..19b4a5bdc87726adaee78e47a609ca5c19caa7ca --- /dev/null +++ b/api/arkui/RichEditorModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AttributeModifier } from './component/common'; +import { RichEditorAttribute } from './component/richEditor'; + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + + /** + * Defines RichEditor Modifier + * + * @implements RichEditorAttribute, AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RichEditorModifier implements RichEditorAttribute, AttributeModifier {} \ No newline at end of file diff --git a/api/arkui/component/richEditor.static.d.ets b/api/arkui/component/richEditor.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef007387b61a1f0063dfb124e8c7f80f296b2d5c --- /dev/null +++ b/api/arkui/component/richEditor.static.d.ets @@ -0,0 +1,2232 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font, VoidCallback } from './units'; +import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums'; +import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString'; +import { Resource } from './../../../api/global/resource'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon'; +import { GestureEvent } from './gesture'; +import { EnterKeyType, SubmitEvent } from './textInput'; +import { LengthMetrics, ColorMetrics } from '../Graphics'; +import { TextBackgroundStyle } from './span'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Defines delete text direction. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum RichEditorDeleteDirection { + /** + * Delete backward. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BACKWARD, + /** + * Delete forward. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FORWARD +} +/** + * Defines span type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum RichEditorSpanType { + /** + * Text,corresponding textSpan type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT = 0, + /** + * Image,corresponding imageSpan type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + IMAGE = 1, + /** + * Mixed,corresponding mixed span type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + MIXED = 2, + /** + * Builder,corresponding builderSpan type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BUILDER = 3, + /** + * When no other types are explicitly specified, this type will be matched. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DEFAULT = 4 +} +/** + * ResponseType for contextMenu + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum RichEditorResponseType { + /** + * Right click. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + RIGHT_CLICK = 0, + /** + * Long press. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LONG_PRESS = 1, + /** + * Selected by mouse. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SELECT = 2, + /** + * When no other types are explicitly specified, this type will be matched. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DEFAULT = 3 +} +/** + * Defines the span position. + * + * @interface RichEditorSpanPosition + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSpanPosition { + /** + * Define the index of span. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanIndex: number; + /** + * The range of span. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanRange: [ + number, + number + ]; +} +/** + * Defines the span text style. + * + * @interface RichEditorTextStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorTextStyle { + /** + * font color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ResourceColor; + /** + * font size. + * + * @type { ?(Length | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: Length | number; + /** + * font style. + * + * @type { ?FontStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontStyle?: FontStyle; + /** + * font weight. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight?: number | FontWeight | string; + /** + * font family. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFamily?: ResourceStr; + /** + * Font decoration. + * + * @type { ?DecorationStyleInterface } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + decoration?: DecorationStyleInterface; + /** + * Text shadow + * + * @type { ?(ShadowOptions | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textShadow?: ShadowOptions | Array; + /** + * letter spacing. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + letterSpacing?: number | string; + /** + * line height. + * + * @type { ? (number | string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lineHeight?: number | string | Resource; + /** + * Set the text with half leading. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + halfLeading?: boolean; + /** + * Set font feature, advanced text styles and effects as designed by the font author. + * The format is the like the CSS font-feature-settings attribute. + * + * @type { ?string } + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * the values of reference to doc of RichEditor component + * number of can be single or multiple, and separated by comma ','. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFeature?: string; + /** + * Text background style. + * + * @type { ?TextBackgroundStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textBackgroundStyle?: TextBackgroundStyle; +} +/** + * Defines the leading margin placeholder of a paragraph. + * + * @interface LeadingMarginPlaceholder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface LeadingMarginPlaceholder { + /** + * Placeholder pixelMap. + * + * @type { PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pixelMap: PixelMap; + /** + * Placeholder size. + * + * @type { [Dimension, Dimension] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size: [ + Dimension, + Dimension + ]; +} +/** + * Defines the paragraph style. + * + * @interface RichEditorParagraphStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorParagraphStyle { + /** + * Text alignment. + * + * @type { ?TextAlign } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textAlign?: TextAlign; + /** + * Leading margin. + * + * @type { ?(Dimension | LeadingMarginPlaceholder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + leadingMargin?: Dimension | LeadingMarginPlaceholder; + /** + * Set word break type. + * + * @type { ?WordBreak } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + wordBreak?: WordBreak; + /** + * Set line break strategy type. + * + * @type { ?LineBreakStrategy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lineBreakStrategy?: LineBreakStrategy; + /** + * Set paragraph spacing. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + paragraphSpacing?: number; +} +/** + * Defines the paste event. + * + * @interface PasteEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PasteEvent { + /** + * Override system paste event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + preventDefault?: VoidCallback; +} +/** + * Defines the text span. + * + * @interface RichEditorTextSpan + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorTextSpan { + /** + * The position of the text span. + * + * @type { RichEditorSpanPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanPosition: RichEditorSpanPosition; + /** + * The content of the text span. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: string; + /** + * text style. + * + * @type { ?RichEditorTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textStyle?: RichEditorTextStyle; +} +/** + * Defines the richEditor Image Layout Style. + * + * @interface RichEditorLayoutStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface RichEditorLayoutStyle { + /** + * Outer Margin. + * + * @type { ?(Dimension | Margin) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + margin?: Dimension | Margin; + /** + * Border radius. + * + * @type { ?(Dimension | BorderRadiuses) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderRadius?: Dimension | BorderRadiuses; +} +/** + * Defines the span image style. + * + * @interface RichEditorImageSpanStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorImageSpanStyle { + /** + * image size. + * + * @type { ?[Dimension, Dimension] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size?: [ + Dimension, + Dimension + ]; + /** + * image vertical align. + * + * @type { ?ImageSpanAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + verticalAlign?: ImageSpanAlignment; + /** + * image fit. + * + * @type { ?ImageFit } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + objectFit?: ImageFit; + /** + * RichEditor ImageSpan Layout Style. + * + * @type { ?RichEditorLayoutStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + layoutStyle?: RichEditorLayoutStyle; +} +/** + * Defines the symbol span style. + * + * @interface RichEditorSymbolSpanStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSymbolSpanStyle { + /** + * The font size. + * + * @type { ?(number | string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: number | string | Resource; + /** + * The font color. + * + * @type { ?Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: Array; + /** + * The font weight. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight?: number | FontWeight | string; + /** + * The symbol span effect strategy. + * + * @type { ?SymbolEffectStrategy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + effectStrategy?: SymbolEffectStrategy; + /** + * The symbol span rendering strategy. + * + * @type { ?SymbolRenderingStrategy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderingStrategy?: SymbolRenderingStrategy; +} +/** + * Defines the text style result. + * + * @interface RichEditorTextStyleResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorTextStyleResult { + /** + * font color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor: ResourceColor; + /** + * font size. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize: number; + /** + * font style. + * + * @type { FontStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontStyle: FontStyle; + /** + * font weight. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight: number; + /** + * font family. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFamily: string; + /** + * Font decoration. + * + * @type { DecorationStyleResult } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + decoration: DecorationStyleResult; + /** + * Text shadow + * + * @type { ?Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textShadow?: Array; + /** + * letter spacing. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + letterSpacing?: number; + /** + * line height. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lineHeight?: number; + /** + * Set the text with half leading. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + halfLeading?: boolean; + /** + * Set font feature, advanced text styles and effects as designed by the font author. + * The format is the like the CSS font-feature-settings attribute. + * + * @type { ?string } + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * the values of reference to doc of RichEditor component + * number of can be single or multiple, and separated by comma ','. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFeature?: string; + /** + * Text background style. + * + * @type { ?TextBackgroundStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textBackgroundStyle?: TextBackgroundStyle; +} +/** + * Defines the paragraph result. + * + * @interface RichEditorParagraphResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorParagraphResult { + /** + * The paragraph style. + * + * @type { RichEditorParagraphStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style: RichEditorParagraphStyle; + /** + * The range of paragraph based on character indices. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + range: [ + number, + number + ]; +} +/** + * Defines the symbol span style result. + * + * @interface RichEditorSymbolSpanStyleResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSymbolSpanStyleResult { + /** + * The font size. + * + * @type { number | string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize: number | string | Resource; + /** + * The font color. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor: Array; + /** + * The font weight. + * + * @type { number | FontWeight | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight: number | FontWeight | string; + /** + * The symbol span effect strategy. + * + * @type { SymbolEffectStrategy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + effectStrategy: SymbolEffectStrategy; + /** + * The symbol span rendering strategy. + * + * @type { SymbolRenderingStrategy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderingStrategy: SymbolRenderingStrategy; +} +/** + * Defines the text span result. + * + * @interface RichEditorTextSpanResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorTextSpanResult { + /** + * The position of the text span. + * + * @type { RichEditorSpanPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanPosition: RichEditorSpanPosition; + /** + * The content of the text span. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: string; + /** + * text style. + * + * @type { RichEditorTextStyleResult } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textStyle: RichEditorTextStyleResult; + /** + * get offset in span. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetInSpan: [ + number, + number + ]; + /** + * Symbol span style. + * + * @type { ?RichEditorSymbolSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolSpanStyle?: RichEditorSymbolSpanStyle; + /** + * The resource string of the symbol span. + * + * @type { ?Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + valueResource?: Resource; + /** + * The Style of paragraph. + * + * @type { ?RichEditorParagraphStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + paragraphStyle?: RichEditorParagraphStyle; + /** + * The preview text. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewText?: string; + /** + * RichEditor url style. + * + * @type { ?RichEditorUrlStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + urlStyle?: RichEditorUrlStyle; +} +/** + * Defines the span image style result. + * + * @interface RichEditorImageSpanStyleResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorImageSpanStyleResult { + /** + * image size. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size: [ + number, + number + ]; + /** + * image vertical align. + * + * @type { ImageSpanAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + verticalAlign: ImageSpanAlignment; + /** + * image fit. + * + * @type { ImageFit } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + objectFit: ImageFit; + /** + * RichEditor ImageSpan Layout Style. + * + * @type { ?RichEditorLayoutStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + layoutStyle?: RichEditorLayoutStyle; +} +/** + * Defines the image span. + * + * @interface RichEditorImageSpanResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorImageSpanResult { + /** + * The position of the image span. + * + * @type { RichEditorSpanPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanPosition: RichEditorSpanPosition; + /** + * The pixel map of the image span. + * + * @type { ?PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + valuePixelMap?: PixelMap; + /** + * The resource string of the image span. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + valueResourceStr?: ResourceStr; + /** + * image attribute. + * + * @type { RichEditorImageSpanStyleResult } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageStyle: RichEditorImageSpanStyleResult; + /** + * get offset in span. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offsetInSpan: [ + number, + number + ]; +} +/** + * Defines the image span. + * + * @interface RichEditorImageSpan + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorImageSpan { + /** + * The position of the image span. + * + * @type { RichEditorSpanPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spanPosition: RichEditorSpanPosition; + /** + * The content of the image span. + * + * @type { PixelMap | ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: PixelMap | ResourceStr; + /** + * image style. + * + * @type { ?RichEditorImageSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageStyle?: RichEditorImageSpanStyle; +} +/** + * Defines range of RichEditor. + * + * @interface RichEditorRange + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorRange { + /** + * start offset. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start?: number; + /** + * end offset. + * + * @type { ?number } + * @default text length + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + end?: number; +} +/** + * Defines the richEditor Gestures. + * + * @interface RichEditorGesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorGesture { + /** + * Trigger a click event when a click is clicked. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onClick?: Callback; + /** + * Trigger a gesture event when long press event is complete. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onLongPress?: Callback; + /** + * Trigger a gesture event when a double click event is complete. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + onDoubleClick?: Callback; +} +/** + * Defines the span options of RichEditor. + * + * @interface RichEditorTextSpanOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorTextSpanOptions { + /** + * the offset that add a text span at. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset?: number; + /** + * text style. + * + * @type { ?RichEditorTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style?: RichEditorTextStyle; + /** + * Paragraph style. + * + * @type { ?RichEditorParagraphStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + paragraphStyle?: RichEditorParagraphStyle; + /** + * RichEditor gesture. + * + * @type { ?RichEditorGesture } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + gesture?: RichEditorGesture; + /** + * RichEditor url style. + * + * @type { ?RichEditorUrlStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + urlStyle?: RichEditorUrlStyle; +} +/** + * Defines the custom keyboard options of RichEditor. + * + * @interface KeyboardOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface KeyboardOptions { + /** + * Indicates whether to support custom keyboard avoidance. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + supportAvoidance?: boolean; +} +/** + * Defines the image span options of RichEditor. + * + * @interface RichEditorImageSpanOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorImageSpanOptions { + /** + * the offset that add image span at. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset?: number; + /** + * image style. + * + * @type { ?RichEditorImageSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageStyle?: RichEditorImageSpanStyle; + /** + * RichEditor gesture. + * + * @type { ?RichEditorGesture } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + gesture?: RichEditorGesture; + /** + * RichEditor onHover. + * + * @type { ?OnHoverCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onHover?: OnHoverCallback; +} +/** + * Defines the builder span options of RichEditor. + * + * @interface RichEditorBuilderSpanOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorBuilderSpanOptions { + /** + * The offset that add custom builder span at. + * + * @type { ?number } Indicates the index where the builder will be inserted + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset?: number; + /** + * builder span drag background color + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + dragBackgroundColor?: ColorMetrics; + /** + * builder span drag shadow configuration + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + isDragShadowNeeded?: boolean; +} +/** + * Defines the placeholder style. + * + * @interface PlaceholderStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PlaceholderStyle { + /** + * font. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + font?: Font; + /** + * fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ResourceColor; +} +/** + * Defines span style option of RichEditor. + * + * @extends RichEditorRange + * @interface RichEditorSpanStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSpanStyleOptions extends RichEditorRange { +} +/** + * Defines paragraph style option of RichEditor. + * + * @extends RichEditorRange + * @interface RichEditorParagraphStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorParagraphStyleOptions extends RichEditorRange { + /** + * Paragraph style. + * + * @type { RichEditorParagraphStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style: RichEditorParagraphStyle; +} +/** + * Defines text span style option of RichEditor. + * + * @extends RichEditorSpanStyleOptions + * @interface RichEditorUpdateTextSpanStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions { + /** + * text style. + * + * @type { RichEditorTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textStyle: RichEditorTextStyle; + /** + * RichEditor url style. + * + * @type { ?RichEditorUrlStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + urlStyle?: RichEditorUrlStyle; +} +/** + * Defines image span style option of RichEditor. + * + * @extends RichEditorSpanStyleOptions + * @interface RichEditorUpdateImageSpanStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions { + /** + * image style. + * + * @type { RichEditorImageSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageStyle: RichEditorImageSpanStyle; +} +/** + * Defines symbol span style option of RichEditor. + * + * @extends RichEditorSpanStyleOptions + * @interface RichEditorUpdateSymbolSpanStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions { + /** + * Update the symbol span style. + * + * @type { RichEditorSymbolSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle: RichEditorSymbolSpanStyle; +} +/** + * Defines the symbol span options of RichEditor. + * + * @interface RichEditorSymbolSpanOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSymbolSpanOptions { + /** + * The offset that add custom symbol span at. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset?: number; + /** + * The style that add custom symbol span at. + * + * @type { ?RichEditorSymbolSpanStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style?: RichEditorSymbolSpanStyle; +} +/** + * Defines the text information for editing. + * + * @interface RichEditorSelection + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorSelection { + /** + * The location info. + * + * @type { [number, number] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selection: [ + number, + number + ]; + /** + * The selected text content. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + spans: Array; +} +/** + * Defines the inserted text value info. + * + * @interface RichEditorInsertValue + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorInsertValue { + /** + * The location info where the value will be inserted. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + insertOffset: number; + /** + * The inserted value. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + insertValue: string; + /** + * The preview text. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewText?: string; +} +/** + * Provides an interface for deleting value from text. + * + * @interface RichEditorDeleteValue + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorDeleteValue { + /** + * The offset of deleting. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset: number; + /** + * The deleted direction. + * + * @type { RichEditorDeleteDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + direction: RichEditorDeleteDirection; + /** + * The deleted text length. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + length: number; + /** + * The deleted span object. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + richEditorDeleteSpans: Array; +} +/** + * Provides an interface for changes in the text. + * + * @interface RichEditorChangeValue + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorChangeValue { + /** + * Range of content that will be replaced. + * + * @type { TextRange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + rangeBefore: TextRange; + /** + * Text spans to replace. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + replacedSpans: Array; + /** + * Image spans to replace. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + replacedImageSpans: Array; + /** + * Symbol spans to replace. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + replacedSymbolSpans: Array; +} +/** + * Defines the options of RichEditor. + * + * @interface RichEditorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorOptions { + /** + * RichEditor controller. + * + * @type { RichEditorController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: RichEditorController; +} +/** + * Defines the options of RichEditor with StyledString. + * + * @interface RichEditorStyledStringOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorStyledStringOptions { + /** + * RichEditor controller. + * + * @type { RichEditorStyledStringController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: RichEditorStyledStringController; +} +/** + * Defines the selection menu options. + * + * @interface SelectionMenuOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface SelectionMenuOptions { + /** + * Callback function when the selection menu appears. + * + * @type { ?MenuOnAppearCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onAppear?: MenuOnAppearCallback; + /** + * Callback function when the selection menu disappears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDisappear?: VoidCallback; + /** + * Menu type, default value is MenuType.SELECTION_MENU. + * + * @type { ?MenuType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + menuType?: MenuType; + /** + * Callback function when the selection menu is displayed. + * + * @type { ?MenuCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onMenuShow?: MenuCallback; + /** + * Callback function when the selection menu is hidden. + * + * @type { ?MenuCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onMenuHide?: MenuCallback; + /** + * Defines the preview menu options. + * + * @type { ?PreviewMenuOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewMenuOptions?: PreviewMenuOptions; +} +/** + * Defines the preview menu options. + * + * @interface PreviewMenuOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface PreviewMenuOptions { + /** + * Defines the haptic feedback mode of preview menu. + * + * @type { ?HapticFeedbackMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hapticFeedbackMode?: HapticFeedbackMode; +} +/** + * Provides Base Controller for RichEditor. + * + * @implements TextEditControllerEx + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RichEditorBaseController implements TextEditControllerEx { + /** + * Get caret offset from controller. + * + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getCaretOffset(): number; + /** + * Set caret offset. + * + * @param { number } offset - caret offset. + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setCaretOffset(offset: number): boolean; + /** + * close the select menu when menu is on. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + closeSelectionMenu(): void; + /** + * Get the typing text style. + * + * @returns { RichEditorTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTypingStyle(): RichEditorTextStyle; + /** + * Set the typing text style. + * + * @param { RichEditorTextStyle } value - set the typing text style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setTypingStyle(value: RichEditorTextStyle): void; + /** + * Specify the start and end positions to select a range of content. + * + * @param { number } selectionStart - The start position of the selected text. + * @param { number } selectionEnd - The end position of the selected text. + * @param { SelectionOptions } [options] - Indicates the options of selection. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; + /** + * Judge whether is in editing state + * + * @returns { boolean } - true is editing state, false is non editing status + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEditing(): boolean; + /** + * Stop editing state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stopEditing(): void; + /** + * Get LayoutManager. + * + * @returns { LayoutManager } - Return the LayoutManager. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getLayoutManager(): LayoutManager; + /** + * Get PreviewText. + * + * @returns { PreviewText } - Return the PreviewText. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPreviewText(): PreviewText; + /** + * Get CaretRect. + * + * @returns { RectResult | undefined } - Return the caret rect or undefined value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getCaretRect(): RectResult | undefined; +} +/** + * Provides Controller for RichEditor. + * + * @extends RichEditorBaseController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RichEditorController extends RichEditorBaseController { + /** + * Add a text span. + * + * @param { ResourceStr } content - text value. + * @param { RichEditorTextSpanOptions } [options] - span info. + * @returns { number } span index + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number; + /** + * Add a image span. + * + * @param { PixelMap | ResourceStr } value - image value. + * @param { RichEditorImageSpanOptions } [options] - image span info. + * @returns { number } span index + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number; + /** + * Add a builder span. + * + * @param { CustomBuilder } value - Indicates the custom builder node + * @param { RichEditorBuilderSpanOptions } [options] - span option. + * @returns { number } span index + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number; + /** + * Add a symbol span. + * + * @param { Resource } value - symbol span value + * @param { RichEditorSymbolSpanOptions } [options] - symbol span option. + * @returns { number } symbol span index + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions): number; + /** + * Modify span style. + * + * @param { RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | + * RichEditorUpdateSymbolSpanStyleOptions } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | + RichEditorUpdateSymbolSpanStyleOptions): void; + /** + * Modify span style. + * + * @param { RichEditorParagraphStyleOptions } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + updateParagraphStyle(value: RichEditorParagraphStyleOptions): void; + /** + * Delete span. + * + * @param { RichEditorRange } [value] - range for deleting. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + deleteSpans(value?: RichEditorRange): void; + /** + * Get span content. + * + * @param { RichEditorRange } [value] - range for getting span info. + * @returns { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getSpans(value?: RichEditorRange): Array; + /** + * Get span content. + * + * @param { RichEditorRange } [value] - range for getting span info. + * @returns { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getParagraphs(value?: RichEditorRange): Array; + /** + * Called when the content is selected. + * + * @returns { RichEditorSelection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getSelection(): RichEditorSelection; + /** + * Convert StyledString to spans in rich editor. + * return a empty Array if convert failed + * + * @param { StyledString } value - StyledString. + * @returns { Array } + * @throws { BusinessError } 401 - The parameter check failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fromStyledString(value: StyledString): Array; + /** + * Convert spans to StyledString in rich editor. + * return a empty StyledString if convert failed + * + * @param { RichEditorRange } value - range of spans in rich editor + * @returns { StyledString } + * @throws { BusinessError } 401 - The parameter check failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + toStyledString(value: RichEditorRange): StyledString; +} +/** + * Defines the types of spans in rich editor. + * + * @typedef { RichEditorImageSpanResult | RichEditorTextSpanResult } RichEditorSpan + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult; +/** + * Provides Controller for RichEditor with StyledString. + * + * @extends RichEditorBaseController + * @implements StyledStringController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RichEditorStyledStringController extends RichEditorBaseController + implements StyledStringController { + /** + * Set the StyledString of the RichEditor. + * + * @param { StyledString } styledString - StyledString. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setStyledString(styledString: StyledString): void; + /** + * Get the StyledString of the RichEditor. + * + * @returns { MutableStyledString } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getStyledString(): MutableStyledString; + /** + * Get the selection in the StyledString of the RichEditor. + * + * @returns { RichEditorRange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getSelection(): RichEditorRange; + /** + * Register content changed listener + * + * @param { StyledStringChangedListener } listener - content changed listener. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onContentChanged(listener: StyledStringChangedListener): void; +} +/** + * Provides attribute for RichEditor. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface RichEditorAttribute extends CommonMethod { + /** + * Called when on ready. + * + * @param { VoidCallback | undefined } callback - The triggered function when rich editor is ready. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onReady(callback: VoidCallback | undefined): this; + /** + * Called when the content is selected. + * + * @param { Callback | undefined } callback - The triggered function when select text. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelect(callback: Callback | undefined): this; + /** + * Called when selection range or caret position is changed. + * + * @param { Callback | undefined } callback - The triggered function when change selection range or + * caret position. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelectionChange(callback: Callback | undefined): this; + /** + * Get text value information when about to input. + * + * @param { Callback | undefined } callback - The triggered function when text + * content is about to insert. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + aboutToIMEInput(callback: Callback | undefined): this; + /** + * Get text value information when completed input. + * + * @param { Callback | undefined } callback - The triggered function when text content + * has been inserted. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onIMEInputComplete(callback: Callback | undefined): this; + /** + * Called when ime input complete. + * + * @param { Callback | undefined } callback - The triggered function when text content has been inserted. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDidIMEInput(callback: Callback | undefined): this; + /** + * Get text value information when about to delete. + * + * @param { Callback | undefined } callback - The triggered function when text + * content is about to delete. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + aboutToDelete(callback: Callback | undefined): this; + /** + * Notify that the deletion has been completed + * + * @param { VoidCallback | undefined } callback - The triggered function when text content has been deleted. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDeleteComplete(callback: VoidCallback | undefined): this; + /** + * Allow replication. + * + * @param { CopyOptions | undefined } value - Indicates the type of copy option. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + copyOptions(value: CopyOptions | undefined): this; + /** + * Bind to the selection menu. + * + * @param { RichEditorSpanType | undefined } spanType - Indicates the type of selection menu. + * @param { CustomBuilder | undefined } content - Indicates the content of selection menu. + * @param { ResponseType | RichEditorResponseType | undefined } responseType - Indicates response type of + * selection menu. + * @param { SelectionMenuOptions | undefined } [options] - Indicates the options of selection menu. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bindSelectionMenu(spanType: RichEditorSpanType | undefined, content: CustomBuilder | undefined, + responseType: ResponseType | RichEditorResponseType | undefined, + options?: SelectionMenuOptions | undefined): this; + /** + * Define custom keyboard. + * + * @param { CustomBuilder | undefined } value - Set up a custom keyboard of RichEditor + * @param { KeyboardOptions | undefined } [options] - Indicates the custom keyboard options of RichEditor + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + customKeyboard(value: CustomBuilder | undefined, options?: KeyboardOptions | undefined): this; + /** + * Defines onPaste callback. + * + * @param { PasteEventCallback | undefined } callback Executed when a paste operation is performed. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onPaste(callback: PasteEventCallback | undefined): this; + /** + * Enable data detector. + * + * @param { boolean | undefined } enable - Enable data detector. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableDataDetector(enable: boolean | undefined): this; + /** + * Enable preview text. + * + * @param { boolean | undefined } enable - Enable preview text. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enablePreviewText(enable: boolean | undefined): this; + /** + * Data detector with config. + * + * @param { TextDataDetectorConfig | undefined } config - The config of text data detector. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dataDetectorConfig(config: TextDataDetectorConfig | undefined): this; + /** + * Set richEditor placeholder. + * + * @param { ResourceStr | undefined } value - The value of placeholder. + * @param { PlaceholderStyle | undefined } [style] - The style of placeholder. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + placeholder(value: ResourceStr | undefined, style?: PlaceholderStyle | undefined): this; + /** + * Set caret color of rich editor. + * + * @param { ResourceColor | undefined } value - Custom color types. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + caretColor(value: ResourceColor | undefined): this; + /** + * Set background color of selected text in rich editor. + * + * @param { ResourceColor | undefined } value - Custom color types. + * @returns { RichEditorAttribute } The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Called when edit status is changed + * + * @param { Callback | undefined } callback - when edit status is changed + * @returns { RichEditorAttribute } returns The attribute of the rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onEditingChange(callback: Callback | undefined): this; + /** + * Set enter key type of soft keyboard. + * + * @param { EnterKeyType | undefined } value - the enter key type of soft keyboard + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enterKeyType(value: EnterKeyType | undefined): this; + /** + * Called when submitted. + * + * @param { SubmitCallback | undefined } callback - callback of the listened event. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSubmit(callback: SubmitCallback | undefined): this; + /** + * Called before text changed. + * + * @param { Callback | undefined } callback - The triggered function before text + * content is about to change. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onWillChange(callback: Callback | undefined): this; + /** + * Called after text changed. + * + * @param { OnDidChangeCallback | undefined } callback - The triggered function after content changed. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDidChange(callback: OnDidChangeCallback | undefined): this; + /** + * Called before the cut event. + * + * @param { Callback | undefined } callback - Called before the cut event. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCut(callback: Callback | undefined): this; + /** + * Called before the copy event. + * + * @param { Callback | undefined } callback - Called before the copy event. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCopy(callback: Callback | undefined): this; + /** + * Set the custom text menu. + * + * @param { EditMenuOptions | undefined } editMenu - Customize text menu options. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + editMenuOptions(editMenu: EditMenuOptions | undefined): this; + /** + * Sets whether request keyboard or not when on focus. + * + * @param { boolean | undefined } isEnabled - Whether enable request keyboard when on focus. + * @returns { RichEditorAttribute } Returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableKeyboardOnFocus(isEnabled: boolean | undefined): this; + /** + * Enable or disable haptic feedback. + * + * @param { boolean | undefined } isEnabled - Default value is true, set false to disable haptic feedback. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableHapticFeedback(isEnabled: boolean | undefined): this; + /** + * Define bar state of the RichEditor. + * + * @param { BarState | undefined } state - bar state. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + barState(state: BarState | undefined): this; + /** + * Define the max length content of the richEditor. + * + * @param { Optional } maxLength - The maximun length content of the richEditor. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + maxLength(maxLength: number | undefined): this; + /** + * Define max lines of the richEditor. + * + * @param { Optional } maxLines - The maximun Lines of the richEditor. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + maxLines(maxLines: number | undefined): this; + /** + * Set the keyboard appearance. + * + * @param { Optional } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + keyboardAppearance(appearance: KeyboardAppearance | undefined): this; + /** + * Set whether stop backPressed callback event or not. + * + * @param { Optional } 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 + */ + stopBackPress(isStopped: boolean | undefined): this; + /** + * Sets the attribute modifier. + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + attributeModifier(modifier: AttributeModifier | AttributeModifier | + undefined): this; +} +/** + * the callback of cut event. + * @interface CutEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CutEvent { + /** + * Prevent system cut event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + preventDefault?: VoidCallback; +} +/** + * the callback of copy event. + * @interface CopyEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CopyEvent { + /** + * Prevent system cut event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + preventDefault?: VoidCallback; +} +/** + * RichEditor url style. + * @interface RichEditorUrlStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RichEditorUrlStyle { + /** + * uniform resoure locator. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + url?: ResourceStr; +} +/** + * callback of the listened enter key event. + * + * @typedef { function } SubmitCallback + * @param { EnterKeyType } enterKey - the enter key type of soft keyboard. + * @param { SubmitEvent } event - Provides the method of keeping RichEditor editable state when submitted. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; +/** + * Callback function when the selection menu appears. + * + * @typedef { function } MenuOnAppearCallback + * @param { number } start - Start offset of the selected content in rich editor. + * @param { number } end - End offset of the selected content in rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type MenuOnAppearCallback = (start: number, end: number) => void; +/** + * Callback function when the selection menu show or hide. + * + * @typedef { function } MenuCallback + * @param { number } start - Start offset of the selected content in rich editor. + * @param { number } end - End offset of the selected content in rich editor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type MenuCallback = (start: number, end: number) => void; +/** + * Callback function when a paste operation is performed. + * + * @typedef { function } PasteEventCallback + * @param { PasteEvent } [event] - The paste event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type PasteEventCallback = (event?: PasteEvent) => void; +/** + * callback of the on hover event. + * + * @typedef { function } OnHoverCallback + * @param { boolean } status - The hover status + * @param { HoverEvent } event - The event info for hover. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type OnHoverCallback = (status: boolean, event: HoverEvent) => void; + +/** + * Defines RichEditor Component. + * + * @param { RichEditorOptions | RichEditorStyledStringOptions } [options] + * @param { function } [content_] + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@memo +@ComponentBuilder +export declare function RichEditor( + options: RichEditorOptions | RichEditorStyledStringOptions, + @memo + content_?: () => void, +): RichEditorAttribute \ No newline at end of file