• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/*** if arkts 1.2 */
22import {  ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common';
23import { CustomBuilder } from './builder';
24import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font } from './units';
25import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums';
26import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString';
27import { Resource } from './../../../api/global/resource';
28import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph';
29import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon';
30import { GestureEvent } from './gesture';
31import { EnterKeyType, SubmitEvent } from './textInput';
32import { LengthMetrics , ColorMetrics } from '../Graphics';
33import { TextBackgroundStyle } from "./span";
34/*** endif */
35
36/**
37 * Defines delete text direction.
38 *
39 * @enum { number }
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @since 10
42 */
43/**
44 * Defines delete text direction.
45 *
46 * @enum { number }
47 * @syscap SystemCapability.ArkUI.ArkUI.Full
48 * @crossplatform
49 * @atomicservice
50 * @since arkts {'1.1':'11','1.2':'20'}
51 * @arkts 1.1&1.2
52 */
53declare enum RichEditorDeleteDirection {
54  /**
55   * Delete backward.
56   *
57   * @syscap SystemCapability.ArkUI.ArkUI.Full
58   * @since 10
59   */
60  /**
61   * Delete backward.
62   *
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @crossplatform
65   * @atomicservice
66   * @since arkts {'1.1':'11','1.2':'20'}
67   * @arkts 1.1&1.2
68   */
69  BACKWARD,
70
71  /**
72   * Delete forward.
73   *
74   * @syscap SystemCapability.ArkUI.ArkUI.Full
75   * @since 10
76   */
77  /**
78   * Delete forward.
79   *
80   * @syscap SystemCapability.ArkUI.ArkUI.Full
81   * @crossplatform
82   * @atomicservice
83   * @since arkts {'1.1':'11','1.2':'20'}
84   * @arkts 1.1&1.2
85   */
86  FORWARD,
87}
88
89/**
90 * Defines span type.
91 *
92 * @enum { number }
93 * @syscap SystemCapability.ArkUI.ArkUI.Full
94 * @since 10
95 */
96/**
97 * Defines span type.
98 *
99 * @enum { number }
100 * @syscap SystemCapability.ArkUI.ArkUI.Full
101 * @crossplatform
102 * @atomicservice
103 * @since arkts {'1.1':'11','1.2':'20'}
104 * @arkts 1.1&1.2
105 */
106declare enum RichEditorSpanType {
107  /**
108   * Text,corresponding textSpan type.
109   *
110   * @syscap SystemCapability.ArkUI.ArkUI.Full
111   * @since 10
112   */
113  /**
114   * Text,corresponding textSpan type.
115   *
116   * @syscap SystemCapability.ArkUI.ArkUI.Full
117   * @crossplatform
118   * @atomicservice
119   * @since arkts {'1.1':'11','1.2':'20'}
120   * @arkts 1.1&1.2
121   */
122  TEXT = 0,
123
124  /**
125   * Image,corresponding imageSpan type.
126   *
127   * @syscap SystemCapability.ArkUI.ArkUI.Full
128   * @since 10
129   */
130  /**
131   * Image,corresponding imageSpan type.
132   *
133   * @syscap SystemCapability.ArkUI.ArkUI.Full
134   * @crossplatform
135   * @atomicservice
136   * @since arkts {'1.1':'11','1.2':'20'}
137   * @arkts 1.1&1.2
138   */
139  IMAGE = 1,
140
141  /**
142   * Mixed,corresponding mixed span type.
143   *
144   * @syscap SystemCapability.ArkUI.ArkUI.Full
145   * @since 10
146   */
147  /**
148   * Mixed,corresponding mixed span type.
149   *
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @crossplatform
152   * @atomicservice
153   * @since arkts {'1.1':'11','1.2':'20'}
154   * @arkts 1.1&1.2
155   */
156  MIXED = 2,
157
158  /**
159   * Builder,corresponding builderSpan type.
160   *
161   * @syscap SystemCapability.ArkUI.ArkUI.Full
162   * @crossplatform
163   * @atomicservice
164   * @since arkts {'1.1':'12','1.2':'20'}
165   * @arkts 1.1&1.2
166   */
167  BUILDER = 3,
168
169  /**
170   * When no other types are explicitly specified, this type will be matched.
171   *
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @crossplatform
174   * @atomicservice
175   * @since arkts {'1.1':'15','1.2':'20'}
176   * @arkts 1.1&1.2
177   */
178  DEFAULT = 4,
179}
180
181/**
182 * Defines undo style.
183 *
184 * @enum { number }
185 * @syscap SystemCapability.ArkUI.ArkUI.Full
186 * @crossplatform
187 * @atomicservice
188 * @since 20
189 */
190declare enum UndoStyle {
191  /**
192   * Undo without style.
193   *
194   * @syscap SystemCapability.ArkUI.ArkUI.Full
195   * @crossplatform
196   * @atomicservice
197   * @since 20
198   */
199  CLEAR_STYLE = 0,
200
201  /**
202   * Undo keep style.
203   *
204   * @syscap SystemCapability.ArkUI.ArkUI.Full
205   * @crossplatform
206   * @atomicservice
207   * @since 20
208   */
209  KEEP_STYLE = 1,
210}
211
212/**
213 * ResponseType for contextMenu
214 *
215 * @enum { number }
216 * @syscap SystemCapability.ArkUI.ArkUI.Full
217 * @crossplatform
218 * @since 11
219 */
220/**
221 * ResponseType for contextMenu
222 *
223 * @enum { number }
224 * @syscap SystemCapability.ArkUI.ArkUI.Full
225 * @crossplatform
226 * @atomicservice
227 * @since arkts {'1.1':'12','1.2':'20'}
228 * @arkts 1.1&1.2
229 */
230declare enum RichEditorResponseType {
231  /**
232   * Right click.
233   *
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @since 11
237   */
238  /**
239   * Right click.
240   *
241   * @syscap SystemCapability.ArkUI.ArkUI.Full
242   * @crossplatform
243   * @atomicservice
244   * @since arkts {'1.1':'12','1.2':'20'}
245   * @arkts 1.1&1.2
246   */
247  RIGHT_CLICK = 0,
248
249  /**
250   * Long press.
251   *
252   * @syscap SystemCapability.ArkUI.ArkUI.Full
253   * @crossplatform
254   * @since 11
255   */
256  /**
257   * Long press.
258   *
259   * @syscap SystemCapability.ArkUI.ArkUI.Full
260   * @crossplatform
261   * @atomicservice
262   * @since arkts {'1.1':'12','1.2':'20'}
263   * @arkts 1.1&1.2
264   */
265  LONG_PRESS = 1,
266
267  /**
268   * Selected by mouse.
269   *
270   * @syscap SystemCapability.ArkUI.ArkUI.Full
271   * @crossplatform
272   * @since 11
273   */
274  /**
275   * Selected by mouse.
276   *
277   * @syscap SystemCapability.ArkUI.ArkUI.Full
278   * @crossplatform
279   * @atomicservice
280   * @since arkts {'1.1':'12','1.2':'20'}
281   * @arkts 1.1&1.2
282   */
283  SELECT = 2,
284
285  /**
286   * When no other types are explicitly specified, this type will be matched.
287   *
288   * @syscap SystemCapability.ArkUI.ArkUI.Full
289   * @crossplatform
290   * @atomicservice
291   * @since arkts {'1.1':'15','1.2':'20'}
292   * @arkts 1.1&1.2
293   */
294  DEFAULT = 3,
295}
296
297/**
298 * Defines the span position.
299 *
300 * @interface RichEditorSpanPosition
301 * @syscap SystemCapability.ArkUI.ArkUI.Full
302 * @since 10
303 */
304/**
305 * Defines the span position.
306 *
307 * @interface RichEditorSpanPosition
308 * @syscap SystemCapability.ArkUI.ArkUI.Full
309 * @crossplatform
310 * @atomicservice
311 * @since arkts {'1.1':'11','1.2':'20'}
312 * @arkts 1.1&1.2
313 */
314declare interface RichEditorSpanPosition {
315  /**
316   * Define the index of span.
317   *
318   * @type { number }
319   * @syscap SystemCapability.ArkUI.ArkUI.Full
320   * @since 10
321   */
322  /**
323   * Define the index of span.
324   *
325   * @type { number }
326   * @syscap SystemCapability.ArkUI.ArkUI.Full
327   * @crossplatform
328   * @atomicservice
329   * @since arkts {'1.1':'11','1.2':'20'}
330   * @arkts 1.1&1.2
331   */
332  spanIndex: number;
333
334  /**
335   * The range of span.
336   *
337   * @type { [number, number] }
338   * @syscap SystemCapability.ArkUI.ArkUI.Full
339   * @since 10
340   */
341  /**
342   * The range of span.
343   *
344   * @type { [number, number] }
345   * @syscap SystemCapability.ArkUI.ArkUI.Full
346   * @crossplatform
347   * @atomicservice
348   * @since arkts {'1.1':'11','1.2':'20'}
349   * @arkts 1.1&1.2
350   */
351  spanRange: [number, number];
352}
353
354/**
355 * Defines the span text style.
356 *
357 * @interface RichEditorTextStyle
358 * @syscap SystemCapability.ArkUI.ArkUI.Full
359 * @since 10
360 */
361/**
362 * Defines the span text style.
363 *
364 * @interface RichEditorTextStyle
365 * @syscap SystemCapability.ArkUI.ArkUI.Full
366 * @crossplatform
367 * @atomicservice
368 * @since arkts {'1.1':'11','1.2':'20'}
369 * @arkts 1.1&1.2
370 */
371declare interface RichEditorTextStyle {
372  /**
373   * font color.
374   *
375   * @type { ?ResourceColor }
376   * @syscap SystemCapability.ArkUI.ArkUI.Full
377   * @since 10
378   */
379  /**
380   * font color.
381   *
382   * @type { ?ResourceColor }
383   * @syscap SystemCapability.ArkUI.ArkUI.Full
384   * @crossplatform
385   * @atomicservice
386   * @since arkts {'1.1':'11','1.2':'20'}
387   * @arkts 1.1&1.2
388   */
389  fontColor?: ResourceColor;
390
391  /**
392   * font size.
393   *
394   * @type { ?(Length | number) }
395   * @syscap SystemCapability.ArkUI.ArkUI.Full
396   * @since 10
397   */
398  /**
399   * font size.
400   *
401   * @type { ?(Length | number) }
402   * @syscap SystemCapability.ArkUI.ArkUI.Full
403   * @crossplatform
404   * @atomicservice
405   * @since arkts {'1.1':'11','1.2':'20'}
406   * @arkts 1.1&1.2
407   */
408  fontSize?: Length | number;
409
410  /**
411   * font style.
412   *
413   * @type { ?FontStyle }
414   * @syscap SystemCapability.ArkUI.ArkUI.Full
415   * @since 10
416   */
417  /**
418   * font style.
419   *
420   * @type { ?FontStyle }
421   * @syscap SystemCapability.ArkUI.ArkUI.Full
422   * @crossplatform
423   * @atomicservice
424   * @since arkts {'1.1':'11','1.2':'20'}
425   * @arkts 1.1&1.2
426   */
427  fontStyle?: FontStyle;
428
429  /**
430   * font weight.
431   *
432   * @type { ?(number | FontWeight | string) }
433   * @syscap SystemCapability.ArkUI.ArkUI.Full
434   * @since 10
435   */
436  /**
437   * font weight.
438   *
439   * @type { ?(number | FontWeight | string) }
440   * @syscap SystemCapability.ArkUI.ArkUI.Full
441   * @crossplatform
442   * @atomicservice
443   * @since arkts {'1.1':'11','1.2':'20'}
444   * @arkts 1.1&1.2
445   */
446  fontWeight?: number | FontWeight | string;
447
448  /**
449   * font family.
450   *
451   * @type { ?ResourceStr }
452   * @syscap SystemCapability.ArkUI.ArkUI.Full
453   * @since 10
454   */
455  /**
456   * font family.
457   *
458   * @type { ?ResourceStr }
459   * @syscap SystemCapability.ArkUI.ArkUI.Full
460   * @crossplatform
461   * @atomicservice
462   * @since arkts {'1.1':'11','1.2':'20'}
463   * @arkts 1.1&1.2
464   */
465  fontFamily?: ResourceStr;
466
467  /**
468   * font decoration.
469   *
470   * @type { ?object }
471   * @syscap SystemCapability.ArkUI.ArkUI.Full
472   * @since 10
473   */
474  /**
475   * font decoration.
476   *
477   * @type { ?object }
478   * @syscap SystemCapability.ArkUI.ArkUI.Full
479   * @crossplatform
480   * @atomicservice
481   * @since 11
482   */
483  /**
484   * Font decoration.
485   *
486   * @type { ?DecorationStyleInterface }
487   * @syscap SystemCapability.ArkUI.ArkUI.Full
488   * @crossplatform
489   * @atomicservice
490   * @since arkts {'1.1':'12','1.2':'20'}
491   * @arkts 1.1&1.2
492   */
493  decoration?: DecorationStyleInterface;
494
495  /**
496   * Text shadow
497   *
498   * @type { ?(ShadowOptions | Array<ShadowOptions>) }
499   * @syscap SystemCapability.ArkUI.ArkUI.Full
500   * @crossplatform
501   * @since 11
502   */
503  /**
504   * Text shadow
505   *
506   * @type { ?(ShadowOptions | Array<ShadowOptions>) }
507   * @syscap SystemCapability.ArkUI.ArkUI.Full
508   * @crossplatform
509   * @atomicservice
510   * @since arkts {'1.1':'12','1.2':'20'}
511   * @arkts 1.1&1.2
512   */
513  textShadow?: ShadowOptions | Array<ShadowOptions>;
514
515  /**
516   * letter spacing.
517   *
518   * @type { ?(number | string) }
519   * @syscap SystemCapability.ArkUI.ArkUI.Full
520   * @crossplatform
521   * @atomicservice
522   * @since arkts {'1.1':'12','1.2':'20'}
523   * @arkts 1.1&1.2
524   */
525  letterSpacing?: number | string;
526
527  /**
528   * line height.
529   *
530   * @type { ? (number | string | Resource) }
531   * @syscap SystemCapability.ArkUI.ArkUI.Full
532   * @crossplatform
533   * @atomicservice
534   * @since arkts {'1.1':'12','1.2':'20'}
535   * @arkts 1.1&1.2
536   */
537  lineHeight?: number | string | Resource;
538
539  /**
540   * Set the text with half leading.
541   *
542   * @type { ?boolean }
543   * @syscap SystemCapability.ArkUI.ArkUI.Full
544   * @crossplatform
545   * @atomicservice
546   * @since arkts {'1.1':'18','1.2':'20'}
547   * @arkts 1.1&1.2
548   */
549  halfLeading?: boolean;
550
551  /**
552   * Set font feature, advanced text styles and effects as designed by the font author.
553   * The format is the like the CSS font-feature-settings attribute.
554   *
555   * @type { ?string }
556   * normal | <feature-tag-value>,
557   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
558   * the values of <feature-tag-value> reference to doc of RichEditor component
559   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
560   * @syscap SystemCapability.ArkUI.ArkUI.Full
561   * @crossplatform
562   * @atomicservice
563   * @since arkts {'1.1':'12','1.2':'20'}
564   * @arkts 1.1&1.2
565   */
566  fontFeature?: string;
567
568  /**
569   * Text background style.
570   *
571   * @type { ?TextBackgroundStyle }
572   * @syscap SystemCapability.ArkUI.ArkUI.Full
573   * @crossplatform
574   * @atomicservice
575   * @since arkts {'1.1':'18','1.2':'20'}
576   * @arkts 1.1&1.2
577   */
578  textBackgroundStyle?: TextBackgroundStyle;
579}
580
581
582/**
583 * Defines the leading margin placeholder of a paragraph.
584 *
585 * @interface LeadingMarginPlaceholder
586 * @syscap SystemCapability.ArkUI.ArkUI.Full
587 * @crossplatform
588 * @since 11
589 */
590/**
591 * Defines the leading margin placeholder of a paragraph.
592 *
593 * @interface LeadingMarginPlaceholder
594 * @syscap SystemCapability.ArkUI.ArkUI.Full
595 * @crossplatform
596 * @atomicservice
597 * @since arkts {'1.1':'12','1.2':'20'}
598 * @arkts 1.1&1.2
599 */
600declare interface LeadingMarginPlaceholder {
601  /**
602   * Placeholder pixelMap.
603   *
604   * @type { PixelMap }
605   * @syscap SystemCapability.ArkUI.ArkUI.Full
606   * @crossplatform
607   * @since 11
608   */
609  /**
610   * Placeholder pixelMap.
611   *
612   * @type { PixelMap }
613   * @syscap SystemCapability.ArkUI.ArkUI.Full
614   * @crossplatform
615   * @atomicservice
616   * @since arkts {'1.1':'12','1.2':'20'}
617   * @arkts 1.1&1.2
618   */
619  pixelMap: PixelMap;
620
621  /**
622   * Placeholder size.
623   *
624   * @type { [Dimension, Dimension] }
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @crossplatform
627   * @since 11
628   */
629  /**
630   * Placeholder size.
631   *
632   * @type { [Dimension, Dimension] }
633   * @syscap SystemCapability.ArkUI.ArkUI.Full
634   * @crossplatform
635   * @atomicservice
636   * @since arkts {'1.1':'12','1.2':'20'}
637   * @arkts 1.1&1.2
638   */
639  size: [Dimension, Dimension];
640}
641
642/**
643 * Defines the paragraph style.
644 *
645 * @interface RichEditorParagraphStyle
646 * @syscap SystemCapability.ArkUI.ArkUI.Full
647 * @crossplatform
648 * @since 11
649 */
650/**
651 * Defines the paragraph style.
652 *
653 * @interface RichEditorParagraphStyle
654 * @syscap SystemCapability.ArkUI.ArkUI.Full
655 * @crossplatform
656 * @atomicservice
657 * @since arkts {'1.1':'12','1.2':'20'}
658 * @arkts 1.1&1.2
659 */
660declare interface RichEditorParagraphStyle {
661  /**
662   * Text alignment.
663   *
664   * @type { ?TextAlign }
665   * @syscap SystemCapability.ArkUI.ArkUI.Full
666   * @crossplatform
667   * @since 11
668   */
669  /**
670   * Text alignment.
671   *
672   * @type { ?TextAlign }
673   * @syscap SystemCapability.ArkUI.ArkUI.Full
674   * @crossplatform
675   * @atomicservice
676   * @since arkts {'1.1':'12','1.2':'20'}
677   * @arkts 1.1&1.2
678   */
679  textAlign?: TextAlign;
680
681  /**
682   * Vertical alignment of text.
683   *
684   * @type { ?TextVerticalAlign }
685   * @syscap SystemCapability.ArkUI.ArkUI.Full
686   * @crossplatform
687   * @atomicservice
688   * @since 20
689   */
690  textVerticalAlign?: TextVerticalAlign;
691
692  /**
693   * Leading margin.
694   *
695   * @type { ?(Dimension | LeadingMarginPlaceholder) }
696   * @syscap SystemCapability.ArkUI.ArkUI.Full
697   * @crossplatform
698   * @since 11
699   */
700  /**
701   * Leading margin.
702   *
703   * @type { ?(Dimension | LeadingMarginPlaceholder) }
704   * @syscap SystemCapability.ArkUI.ArkUI.Full
705   * @crossplatform
706   * @atomicservice
707   * @since arkts {'1.1':'12','1.2':'20'}
708   * @arkts 1.1&1.2
709   */
710  leadingMargin?: Dimension | LeadingMarginPlaceholder;
711
712  /**
713   * Set word break type.
714   *
715   * @type { ?WordBreak }
716   * @syscap SystemCapability.ArkUI.ArkUI.Full
717   * @crossplatform
718   * @atomicservice
719   * @since arkts {'1.1':'12','1.2':'20'}
720   * @arkts 1.1&1.2
721   */
722  wordBreak?: WordBreak;
723
724  /**
725   * Set line break strategy type.
726   *
727   * @type { ?LineBreakStrategy }
728   * @syscap SystemCapability.ArkUI.ArkUI.Full
729   * @crossplatform
730   * @atomicservice
731   * @since arkts {'1.1':'12','1.2':'20'}
732   * @arkts 1.1&1.2
733   */
734  lineBreakStrategy?: LineBreakStrategy;
735
736  /**
737   * Set paragraph spacing.
738   *
739   * @type { ?number }
740   * @syscap SystemCapability.ArkUI.ArkUI.Full
741   * @crossplatform
742   * @atomicservice
743   * @since arkts {'1.1':'19','1.2':'20'}
744   * @arkts 1.1&1.2
745   */
746  paragraphSpacing?: number;
747}
748
749/**
750 * Defines the paste event.
751 *
752 * @interface PasteEvent
753 * @syscap SystemCapability.ArkUI.ArkUI.Full
754 * @crossplatform
755 * @atomicservice
756 * @since arkts {'1.1':'11','1.2':'20'}
757 * @arkts 1.1&1.2
758 */
759declare interface PasteEvent {
760  /**
761   * Override system paste event.
762   *
763   * @type { ?function }
764   * @syscap SystemCapability.ArkUI.ArkUI.Full
765   * @crossplatform
766   * @atomicservice
767   * @since 11
768   */
769  /**
770   * Override system paste event.
771   *
772   * @type { ?Callback<void> }
773   * @syscap SystemCapability.ArkUI.ArkUI.Full
774   * @crossplatform
775   * @atomicservice
776   * @since arkts {'1.1':'12','1.2':'20'}
777   * @arkts 1.1&1.2
778   */
779  preventDefault?: Callback<void>;
780}
781
782/**
783 * Defines the text span.
784 *
785 * @interface RichEditorTextSpan
786 * @syscap SystemCapability.ArkUI.ArkUI.Full
787 * @since 10
788 */
789/**
790 * Defines the text span.
791 *
792 * @interface RichEditorTextSpan
793 * @syscap SystemCapability.ArkUI.ArkUI.Full
794 * @crossplatform
795 * @atomicservice
796 * @since arkts {'1.1':'11','1.2':'20'}
797 * @arkts 1.1&1.2
798 */
799declare interface RichEditorTextSpan {
800  /**
801   * The position of the text span.
802   *
803   * @type { RichEditorSpanPosition }
804   * @syscap SystemCapability.ArkUI.ArkUI.Full
805   * @since 10
806   */
807  /**
808   * The position of the text span.
809   *
810   * @type { RichEditorSpanPosition }
811   * @syscap SystemCapability.ArkUI.ArkUI.Full
812   * @crossplatform
813   * @atomicservice
814   * @since arkts {'1.1':'11','1.2':'20'}
815   * @arkts 1.1&1.2
816   */
817  spanPosition: RichEditorSpanPosition;
818
819  /**
820   * The content of the text span.
821   *
822   * @type { string }
823   * @syscap SystemCapability.ArkUI.ArkUI.Full
824   * @since 10
825   */
826  /**
827   * The content of the text span.
828   *
829   * @type { string }
830   * @syscap SystemCapability.ArkUI.ArkUI.Full
831   * @crossplatform
832   * @atomicservice
833   * @since arkts {'1.1':'11','1.2':'20'}
834   * @arkts 1.1&1.2
835   */
836  value: string;
837
838  /**
839   * text style.
840   *
841   * @type { ?RichEditorTextStyle }
842   * @syscap SystemCapability.ArkUI.ArkUI.Full
843   * @since 10
844   */
845  /**
846   * text style.
847   *
848   * @type { ?RichEditorTextStyle }
849   * @syscap SystemCapability.ArkUI.ArkUI.Full
850   * @crossplatform
851   * @atomicservice
852   * @since arkts {'1.1':'11','1.2':'20'}
853   * @arkts 1.1&1.2
854   */
855  textStyle?: RichEditorTextStyle;
856}
857
858/**
859 * Defines the richEditor Image Layout Style.
860 *
861 * @interface RichEditorLayoutStyle
862 * @syscap SystemCapability.ArkUI.ArkUI.Full
863 * @crossplatform
864 * @since 11
865 */
866/**
867 * Defines the richEditor Image Layout Style.
868 *
869 * @interface RichEditorLayoutStyle
870 * @syscap SystemCapability.ArkUI.ArkUI.Full
871 * @crossplatform
872 * @atomicservice
873 * @since arkts {'1.1':'12','1.2':'20'}
874 * @arkts 1.1&1.2
875 */
876interface RichEditorLayoutStyle {
877  /**
878   * Outer Margin.
879   *
880   * @type { ?(Dimension | Margin) }
881   * @syscap SystemCapability.ArkUI.ArkUI.Full
882   * @crossplatform
883   * @since 11
884   */
885  /**
886   * Outer Margin.
887   *
888   * @type { ?(Dimension | Margin) }
889   * @syscap SystemCapability.ArkUI.ArkUI.Full
890   * @crossplatform
891   * @atomicservice
892   * @since arkts {'1.1':'12','1.2':'20'}
893   * @arkts 1.1&1.2
894   */
895  margin?: Dimension | Margin;
896
897  /**
898   * Border radius.
899   *
900   * @type { ?(Dimension | BorderRadiuses) }
901   * @syscap SystemCapability.ArkUI.ArkUI.Full
902   * @crossplatform
903   * @since 11
904   */
905  /**
906   * Border radius.
907   *
908   * @type { ?(Dimension | BorderRadiuses) }
909   * @syscap SystemCapability.ArkUI.ArkUI.Full
910   * @crossplatform
911   * @atomicservice
912   * @since arkts {'1.1':'12','1.2':'20'}
913   * @arkts 1.1&1.2
914   */
915  borderRadius?: Dimension | BorderRadiuses;
916}
917
918/**
919 * Defines the span image style.
920 *
921 * @interface RichEditorImageSpanStyle
922 * @syscap SystemCapability.ArkUI.ArkUI.Full
923 * @since 10
924 */
925/**
926 * Defines the span image style.
927 *
928 * @interface RichEditorImageSpanStyle
929 * @syscap SystemCapability.ArkUI.ArkUI.Full
930 * @crossplatform
931 * @atomicservice
932 * @since arkts {'1.1':'11','1.2':'20'}
933 * @arkts 1.1&1.2
934 */
935declare interface RichEditorImageSpanStyle {
936  /**
937   * image size.
938   *
939   * @type { ?[Dimension, Dimension] }
940   * @syscap SystemCapability.ArkUI.ArkUI.Full
941   * @since 10
942   */
943  /**
944   * image size.
945   *
946   * @type { ?[Dimension, Dimension] }
947   * @syscap SystemCapability.ArkUI.ArkUI.Full
948   * @crossplatform
949   * @atomicservice
950   * @since arkts {'1.1':'11','1.2':'20'}
951   * @arkts 1.1&1.2
952   */
953  size?: [Dimension, Dimension];
954
955  /**
956   * image vertical align.
957   *
958   * @type { ?ImageSpanAlignment }
959   * @syscap SystemCapability.ArkUI.ArkUI.Full
960   * @since 10
961   */
962  /**
963   * image vertical align.
964   *
965   * @type { ?ImageSpanAlignment }
966   * @syscap SystemCapability.ArkUI.ArkUI.Full
967   * @crossplatform
968   * @atomicservice
969   * @since arkts {'1.1':'11','1.2':'20'}
970   * @arkts 1.1&1.2
971   */
972  verticalAlign?: ImageSpanAlignment;
973
974  /**
975   * image fit.
976   *
977   * @type { ?ImageFit }
978   * @syscap SystemCapability.ArkUI.ArkUI.Full
979   * @since 10
980   */
981  /**
982   * image fit.
983   *
984   * @type { ?ImageFit }
985   * @syscap SystemCapability.ArkUI.ArkUI.Full
986   * @crossplatform
987   * @atomicservice
988   * @since arkts {'1.1':'11','1.2':'20'}
989   * @arkts 1.1&1.2
990   */
991  objectFit?: ImageFit;
992
993  /**
994   * RichEditor ImageSpan Layout Style.
995   *
996   * @type { ?RichEditorLayoutStyle }
997   * @syscap SystemCapability.ArkUI.ArkUI.Full
998   * @crossplatform
999   * @since 11
1000   */
1001  /**
1002   * RichEditor ImageSpan Layout Style.
1003   *
1004   * @type { ?RichEditorLayoutStyle }
1005   * @syscap SystemCapability.ArkUI.ArkUI.Full
1006   * @crossplatform
1007   * @atomicservice
1008   * @since arkts {'1.1':'12','1.2':'20'}
1009   * @arkts 1.1&1.2
1010   */
1011  layoutStyle?: RichEditorLayoutStyle;
1012}
1013
1014/**
1015 * Defines the symbol span style.
1016 *
1017 * @interface RichEditorSymbolSpanStyle
1018 * @syscap SystemCapability.ArkUI.ArkUI.Full
1019 * @crossplatform
1020 * @since 11
1021 */
1022/**
1023 * Defines the symbol span style.
1024 *
1025 * @interface RichEditorSymbolSpanStyle
1026 * @syscap SystemCapability.ArkUI.ArkUI.Full
1027 * @crossplatform
1028 * @atomicservice
1029 * @since arkts {'1.1':'12','1.2':'20'}
1030 * @arkts 1.1&1.2
1031 */
1032declare interface RichEditorSymbolSpanStyle {
1033  /**
1034   * The font size.
1035   *
1036   * @type { ?(number | string | Resource) }
1037   * @syscap SystemCapability.ArkUI.ArkUI.Full
1038   * @crossplatform
1039   * @since 11
1040   */
1041  /**
1042   * The font size.
1043   *
1044   * @type { ?(number | string | Resource) }
1045   * @syscap SystemCapability.ArkUI.ArkUI.Full
1046   * @crossplatform
1047   * @atomicservice
1048   * @since arkts {'1.1':'12','1.2':'20'}
1049   * @arkts 1.1&1.2
1050   */
1051  fontSize?: number | string | Resource;
1052
1053  /**
1054   * The font color.
1055   *
1056   * @type { ?Array<ResourceColor> }
1057   * @syscap SystemCapability.ArkUI.ArkUI.Full
1058   * @crossplatform
1059   * @since 11
1060   */
1061  /**
1062   * The font color.
1063   *
1064   * @type { ?Array<ResourceColor> }
1065   * @syscap SystemCapability.ArkUI.ArkUI.Full
1066   * @crossplatform
1067   * @atomicservice
1068   * @since arkts {'1.1':'12','1.2':'20'}
1069   * @arkts 1.1&1.2
1070   */
1071  fontColor?: Array<ResourceColor>;
1072
1073  /**
1074   * The font weight.
1075   *
1076   * @type { ?(number | FontWeight | string) }
1077   * @syscap SystemCapability.ArkUI.ArkUI.Full
1078   * @crossplatform
1079   * @since 11
1080   */
1081  /**
1082   * The font weight.
1083   *
1084   * @type { ?(number | FontWeight | string) }
1085   * @syscap SystemCapability.ArkUI.ArkUI.Full
1086   * @crossplatform
1087   * @atomicservice
1088   * @since arkts {'1.1':'12','1.2':'20'}
1089   * @arkts 1.1&1.2
1090   */
1091  fontWeight?: number | FontWeight | string;
1092
1093  /**
1094   * The symbol span effect strategy.
1095   *
1096   * @type { ?SymbolEffectStrategy }
1097   * @syscap SystemCapability.ArkUI.ArkUI.Full
1098   * @crossplatform
1099   * @since 11
1100   */
1101  /**
1102   * The symbol span effect strategy.
1103   *
1104   * @type { ?SymbolEffectStrategy }
1105   * @syscap SystemCapability.ArkUI.ArkUI.Full
1106   * @crossplatform
1107   * @atomicservice
1108   * @since arkts {'1.1':'12','1.2':'20'}
1109   * @arkts 1.1&1.2
1110   */
1111  effectStrategy?: SymbolEffectStrategy;
1112
1113  /**
1114   * The symbol span rendering strategy.
1115   *
1116   * @type { ?SymbolRenderingStrategy }
1117   * @syscap SystemCapability.ArkUI.ArkUI.Full
1118   * @crossplatform
1119   * @since 11
1120   */
1121  /**
1122   * The symbol span rendering strategy.
1123   *
1124   * @type { ?SymbolRenderingStrategy }
1125   * @syscap SystemCapability.ArkUI.ArkUI.Full
1126   * @crossplatform
1127   * @atomicservice
1128   * @since arkts {'1.1':'12','1.2':'20'}
1129   * @arkts 1.1&1.2
1130   */
1131  renderingStrategy?: SymbolRenderingStrategy;
1132}
1133
1134/**
1135 * Defines the text style result.
1136 *
1137 * @interface RichEditorTextStyleResult
1138 * @syscap SystemCapability.ArkUI.ArkUI.Full
1139 * @since 10
1140 */
1141/**
1142 * Defines the text style result.
1143 *
1144 * @interface RichEditorTextStyleResult
1145 * @syscap SystemCapability.ArkUI.ArkUI.Full
1146 * @crossplatform
1147 * @atomicservice
1148 * @since arkts {'1.1':'11','1.2':'20'}
1149 * @arkts 1.1&1.2
1150 */
1151declare interface RichEditorTextStyleResult {
1152  /**
1153   * font color.
1154   *
1155   * @type { ResourceColor }
1156   * @syscap SystemCapability.ArkUI.ArkUI.Full
1157   * @since 10
1158   */
1159  /**
1160   * font color.
1161   *
1162   * @type { ResourceColor }
1163   * @syscap SystemCapability.ArkUI.ArkUI.Full
1164   * @crossplatform
1165   * @atomicservice
1166   * @since arkts {'1.1':'11','1.2':'20'}
1167   * @arkts 1.1&1.2
1168   */
1169  fontColor: ResourceColor;
1170
1171  /**
1172   * font size.
1173   *
1174   * @type { number }
1175   * @syscap SystemCapability.ArkUI.ArkUI.Full
1176   * @since 10
1177   */
1178  /**
1179   * font size.
1180   *
1181   * @type { number }
1182   * @syscap SystemCapability.ArkUI.ArkUI.Full
1183   * @crossplatform
1184   * @atomicservice
1185   * @since arkts {'1.1':'11','1.2':'20'}
1186   * @arkts 1.1&1.2
1187   */
1188  fontSize: number;
1189
1190  /**
1191   * font style.
1192   *
1193   * @type { FontStyle }
1194   * @syscap SystemCapability.ArkUI.ArkUI.Full
1195   * @since 10
1196   */
1197  /**
1198   * font style.
1199   *
1200   * @type { FontStyle }
1201   * @syscap SystemCapability.ArkUI.ArkUI.Full
1202   * @crossplatform
1203   * @atomicservice
1204   * @since arkts {'1.1':'11','1.2':'20'}
1205   * @arkts 1.1&1.2
1206   */
1207  fontStyle: FontStyle;
1208
1209  /**
1210   * font weight.
1211   *
1212   * @type { number }
1213   * @syscap SystemCapability.ArkUI.ArkUI.Full
1214   * @since 10
1215   */
1216  /**
1217   * font weight.
1218   *
1219   * @type { number }
1220   * @syscap SystemCapability.ArkUI.ArkUI.Full
1221   * @crossplatform
1222   * @atomicservice
1223   * @since arkts {'1.1':'11','1.2':'20'}
1224   * @arkts 1.1&1.2
1225   */
1226  fontWeight: number;
1227
1228  /**
1229   * font family.
1230   *
1231   * @type { string }
1232   * @syscap SystemCapability.ArkUI.ArkUI.Full
1233   * @since 10
1234   */
1235  /**
1236   * font family.
1237   *
1238   * @type { string }
1239   * @syscap SystemCapability.ArkUI.ArkUI.Full
1240   * @crossplatform
1241   * @atomicservice
1242   * @since arkts {'1.1':'11','1.2':'20'}
1243   * @arkts 1.1&1.2
1244   */
1245  fontFamily: string;
1246
1247  /**
1248   * font decoration.
1249   *
1250   * @type { object }
1251   * @syscap SystemCapability.ArkUI.ArkUI.Full
1252   * @since 10
1253   */
1254  /**
1255   * font decoration.
1256   *
1257   * @type { object }
1258   * @syscap SystemCapability.ArkUI.ArkUI.Full
1259   * @crossplatform
1260   * @atomicservice
1261   * @since 11
1262   */
1263  /**
1264   * Font decoration.
1265   *
1266   * @type { DecorationStyleResult }
1267   * @syscap SystemCapability.ArkUI.ArkUI.Full
1268   * @crossplatform
1269   * @atomicservice
1270   * @since arkts {'1.1':'12','1.2':'20'}
1271   * @arkts 1.1&1.2
1272   */
1273  decoration: DecorationStyleResult;
1274
1275  /**
1276   * Text shadow
1277   *
1278   * @type { ?Array<ShadowOptions> }
1279   * @syscap SystemCapability.ArkUI.ArkUI.Full
1280   * @crossplatform
1281   * @atomicservice
1282   * @since arkts {'1.1':'12','1.2':'20'}
1283   * @arkts 1.1&1.2
1284   */
1285  textShadow?: Array<ShadowOptions>;
1286
1287  /**
1288   * letter spacing.
1289   *
1290   * @type { ?number }
1291   * @syscap SystemCapability.ArkUI.ArkUI.Full
1292   * @crossplatform
1293   * @atomicservice
1294   * @since arkts {'1.1':'12','1.2':'20'}
1295   * @arkts 1.1&1.2
1296   */
1297  letterSpacing?: number;
1298
1299  /**
1300   * line height.
1301   *
1302   * @type { ?number }
1303   * @syscap SystemCapability.ArkUI.ArkUI.Full
1304   * @crossplatform
1305   * @atomicservice
1306   * @since arkts {'1.1':'12','1.2':'20'}
1307   * @arkts 1.1&1.2
1308   */
1309  lineHeight?: number;
1310
1311  /**
1312   * Set the text with half leading.
1313   *
1314   * @type { ?boolean }
1315   * @syscap SystemCapability.ArkUI.ArkUI.Full
1316   * @crossplatform
1317   * @atomicservice
1318   * @since arkts {'1.1':'18','1.2':'20'}
1319   * @arkts 1.1&1.2
1320   */
1321  halfLeading?: boolean;
1322
1323  /**
1324   * Set font feature, advanced text styles and effects as designed by the font author.
1325   * The format is the like the CSS font-feature-settings attribute.
1326   *
1327   * @type { ?string }
1328   * normal | <feature-tag-value>,
1329   * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0
1330   * the values of <feature-tag-value> reference to doc of RichEditor component
1331   * number of <feature-tag-value> can be single or multiple, and separated by comma ','.
1332   * @syscap SystemCapability.ArkUI.ArkUI.Full
1333   * @crossplatform
1334   * @atomicservice
1335   * @since arkts {'1.1':'12','1.2':'20'}
1336   * @arkts 1.1&1.2
1337   */
1338  fontFeature?: string;
1339
1340  /**
1341   * Text background style.
1342   *
1343   * @type { ?TextBackgroundStyle }
1344   * @syscap SystemCapability.ArkUI.ArkUI.Full
1345   * @crossplatform
1346   * @atomicservice
1347   * @since arkts {'1.1':'18','1.2':'20'}
1348   * @arkts 1.1&1.2
1349   */
1350  textBackgroundStyle?: TextBackgroundStyle;
1351}
1352
1353/**
1354 * Defines the paragraph result.
1355 *
1356 * @interface RichEditorParagraphResult
1357 * @syscap SystemCapability.ArkUI.ArkUI.Full
1358 * @crossplatform
1359 * @since 11
1360 */
1361/**
1362 * Defines the paragraph result.
1363 *
1364 * @interface RichEditorParagraphResult
1365 * @syscap SystemCapability.ArkUI.ArkUI.Full
1366 * @crossplatform
1367 * @atomicservice
1368 * @since arkts {'1.1':'12','1.2':'20'}
1369 * @arkts 1.1&1.2
1370 */
1371declare interface RichEditorParagraphResult {
1372  /**
1373   * The paragraph style.
1374   *
1375   * @type { RichEditorParagraphStyle }
1376   * @syscap SystemCapability.ArkUI.ArkUI.Full
1377   * @crossplatform
1378   * @since 11
1379   */
1380  /**
1381   * The paragraph style.
1382   *
1383   * @type { RichEditorParagraphStyle }
1384   * @syscap SystemCapability.ArkUI.ArkUI.Full
1385   * @crossplatform
1386   * @atomicservice
1387   * @since arkts {'1.1':'12','1.2':'20'}
1388   * @arkts 1.1&1.2
1389   */
1390  style: RichEditorParagraphStyle;
1391
1392  /**
1393   * The range of paragraph based on character indices.
1394   *
1395   * @type { [number, number] }
1396   * @syscap SystemCapability.ArkUI.ArkUI.Full
1397   * @crossplatform
1398   * @since 11
1399   */
1400  /**
1401   * The range of paragraph based on character indices.
1402   *
1403   * @type { [number, number] }
1404   * @syscap SystemCapability.ArkUI.ArkUI.Full
1405   * @crossplatform
1406   * @atomicservice
1407   * @since arkts {'1.1':'12','1.2':'20'}
1408   * @arkts 1.1&1.2
1409   */
1410  range: [number, number];
1411}
1412
1413/**
1414 * Defines the symbol span style result.
1415 *
1416 * @interface RichEditorSymbolSpanStyleResult
1417 * @syscap SystemCapability.ArkUI.ArkUI.Full
1418 * @crossplatform
1419 * @since 11
1420 */
1421/**
1422 * Defines the symbol span style result.
1423 *
1424 * @interface RichEditorSymbolSpanStyleResult
1425 * @syscap SystemCapability.ArkUI.ArkUI.Full
1426 * @crossplatform
1427 * @atomicservice
1428 * @since arkts {'1.1':'12','1.2':'20'}
1429 * @arkts 1.1&1.2
1430 */
1431declare interface RichEditorSymbolSpanStyleResult {
1432  /**
1433   * The font size.
1434   *
1435   * @type { number | string | Resource }
1436   * @syscap SystemCapability.ArkUI.ArkUI.Full
1437   * @crossplatform
1438   * @since 11
1439   */
1440  /**
1441   * The font size.
1442   *
1443   * @type { number | string | Resource }
1444   * @syscap SystemCapability.ArkUI.ArkUI.Full
1445   * @crossplatform
1446   * @atomicservice
1447   * @since arkts {'1.1':'12','1.2':'20'}
1448   * @arkts 1.1&1.2
1449   */
1450  fontSize: number | string | Resource;
1451
1452  /**
1453   * The font color.
1454   *
1455   * @type { Array<ResourceColor> }
1456   * @syscap SystemCapability.ArkUI.ArkUI.Full
1457   * @crossplatform
1458   * @since 11
1459   */
1460  /**
1461   * The font color.
1462   *
1463   * @type { Array<ResourceColor> }
1464   * @syscap SystemCapability.ArkUI.ArkUI.Full
1465   * @crossplatform
1466   * @atomicservice
1467   * @since arkts {'1.1':'12','1.2':'20'}
1468   * @arkts 1.1&1.2
1469   */
1470  fontColor: Array<ResourceColor>;
1471
1472  /**
1473   * The font weight.
1474   *
1475   * @type { number | FontWeight | string }
1476   * @syscap SystemCapability.ArkUI.ArkUI.Full
1477   * @crossplatform
1478   * @since 11
1479   */
1480  /**
1481   * The font weight.
1482   *
1483   * @type { number | FontWeight | string }
1484   * @syscap SystemCapability.ArkUI.ArkUI.Full
1485   * @crossplatform
1486   * @atomicservice
1487   * @since arkts {'1.1':'12','1.2':'20'}
1488   * @arkts 1.1&1.2
1489   */
1490  fontWeight: number | FontWeight | string;
1491
1492  /**
1493   * The symbol span effect strategy.
1494   *
1495   * @type { SymbolEffectStrategy }
1496   * @syscap SystemCapability.ArkUI.ArkUI.Full
1497   * @crossplatform
1498   * @since 11
1499   */
1500  /**
1501   * The symbol span effect strategy.
1502   *
1503   * @type { SymbolEffectStrategy }
1504   * @syscap SystemCapability.ArkUI.ArkUI.Full
1505   * @crossplatform
1506   * @atomicservice
1507   * @since arkts {'1.1':'12','1.2':'20'}
1508   * @arkts 1.1&1.2
1509   */
1510  effectStrategy: SymbolEffectStrategy;
1511
1512  /**
1513   * The symbol span rendering strategy.
1514   *
1515   * @type { SymbolRenderingStrategy }
1516   * @syscap SystemCapability.ArkUI.ArkUI.Full
1517   * @crossplatform
1518   * @since 11
1519   */
1520  /**
1521   * The symbol span rendering strategy.
1522   *
1523   * @type { SymbolRenderingStrategy }
1524   * @syscap SystemCapability.ArkUI.ArkUI.Full
1525   * @crossplatform
1526   * @atomicservice
1527   * @since arkts {'1.1':'12','1.2':'20'}
1528   * @arkts 1.1&1.2
1529   */
1530  renderingStrategy: SymbolRenderingStrategy;
1531}
1532
1533/**
1534 * Defines the text span result.
1535 *
1536 * @interface RichEditorTextSpanResult
1537 * @syscap SystemCapability.ArkUI.ArkUI.Full
1538 * @since 10
1539 */
1540/**
1541 * Defines the text span result.
1542 *
1543 * @interface RichEditorTextSpanResult
1544 * @syscap SystemCapability.ArkUI.ArkUI.Full
1545 * @crossplatform
1546 * @atomicservice
1547 * @since arkts {'1.1':'11','1.2':'20'}
1548 * @arkts 1.1&1.2
1549 */
1550declare interface RichEditorTextSpanResult {
1551  /**
1552   * The position of the text span.
1553   *
1554   * @type { RichEditorSpanPosition }
1555   * @syscap SystemCapability.ArkUI.ArkUI.Full
1556   * @since 10
1557   */
1558  /**
1559   * The position of the text span.
1560   *
1561   * @type { RichEditorSpanPosition }
1562   * @syscap SystemCapability.ArkUI.ArkUI.Full
1563   * @crossplatform
1564   * @atomicservice
1565   * @since arkts {'1.1':'11','1.2':'20'}
1566   * @arkts 1.1&1.2
1567   */
1568  spanPosition: RichEditorSpanPosition;
1569
1570  /**
1571   * The content of the text span.
1572   *
1573   * @type { string }
1574   * @syscap SystemCapability.ArkUI.ArkUI.Full
1575   * @since 10
1576   */
1577  /**
1578   * The content of the text span.
1579   *
1580   * @type { string }
1581   * @syscap SystemCapability.ArkUI.ArkUI.Full
1582   * @crossplatform
1583   * @atomicservice
1584   * @since arkts {'1.1':'11','1.2':'20'}
1585   * @arkts 1.1&1.2
1586   */
1587  value: string;
1588
1589  /**
1590   * text style.
1591   *
1592   * @type { RichEditorTextStyleResult }
1593   * @syscap SystemCapability.ArkUI.ArkUI.Full
1594   * @since 10
1595   */
1596  /**
1597   * text style.
1598   *
1599   * @type { RichEditorTextStyleResult }
1600   * @syscap SystemCapability.ArkUI.ArkUI.Full
1601   * @crossplatform
1602   * @atomicservice
1603   * @since arkts {'1.1':'11','1.2':'20'}
1604   * @arkts 1.1&1.2
1605   */
1606  textStyle: RichEditorTextStyleResult;
1607
1608  /**
1609   * get offset in span.
1610   *
1611   * @type { [number, number] }
1612   * @syscap SystemCapability.ArkUI.ArkUI.Full
1613   * @since 10
1614   */
1615  /**
1616   * get offset in span.
1617   *
1618   * @type { [number, number] }
1619   * @syscap SystemCapability.ArkUI.ArkUI.Full
1620   * @crossplatform
1621   * @atomicservice
1622   * @since arkts {'1.1':'11','1.2':'20'}
1623   * @arkts 1.1&1.2
1624   */
1625  offsetInSpan: [number, number];
1626
1627  /**
1628   * Symbol span style.
1629   *
1630   * @type { ?RichEditorSymbolSpanStyle }
1631   * @syscap SystemCapability.ArkUI.ArkUI.Full
1632   * @crossplatform
1633   * @since 11
1634   */
1635  /**
1636   * Symbol span style.
1637   *
1638   * @type { ?RichEditorSymbolSpanStyle }
1639   * @syscap SystemCapability.ArkUI.ArkUI.Full
1640   * @crossplatform
1641   * @atomicservice
1642   * @since arkts {'1.1':'12','1.2':'20'}
1643   * @arkts 1.1&1.2
1644   */
1645  symbolSpanStyle?: RichEditorSymbolSpanStyle;
1646
1647  /**
1648   * The resource string of the symbol span.
1649   *
1650   * @type { ?Resource }
1651   * @syscap SystemCapability.ArkUI.ArkUI.Full
1652   * @crossplatform
1653   * @since 11
1654   */
1655  /**
1656   * The resource string of the symbol span.
1657   *
1658   * @type { ?Resource }
1659   * @syscap SystemCapability.ArkUI.ArkUI.Full
1660   * @crossplatform
1661   * @atomicservice
1662   * @since arkts {'1.1':'12','1.2':'20'}
1663   * @arkts 1.1&1.2
1664   */
1665  valueResource?: Resource;
1666
1667  /**
1668   * The Style of paragraph.
1669   *
1670   * @type { ?RichEditorParagraphStyle }
1671   * @syscap SystemCapability.ArkUI.ArkUI.Full
1672   * @crossplatform
1673   * @atomicservice
1674   * @since arkts {'1.1':'12','1.2':'20'}
1675   * @arkts 1.1&1.2
1676   */
1677  paragraphStyle?: RichEditorParagraphStyle;
1678
1679  /**
1680   * The preview text.
1681   *
1682   * @type { ?string }
1683   * @syscap SystemCapability.ArkUI.ArkUI.Full
1684   * @crossplatform
1685   * @atomicservice
1686   * @since arkts {'1.1':'12','1.2':'20'}
1687   * @arkts 1.1&1.2
1688   */
1689  previewText?: string;
1690
1691  /**
1692   * RichEditor url style.
1693   *
1694   * @type { ?RichEditorUrlStyle }
1695   * @syscap SystemCapability.ArkUI.ArkUI.Full
1696   * @crossplatform
1697   * @atomicservice
1698   * @since arkts {'1.1':'19','1.2':'20'}
1699   * @arkts 1.1&1.2
1700   */
1701  urlStyle?: RichEditorUrlStyle;
1702}
1703
1704/**
1705 * Defines the span image style result.
1706 *
1707 * @interface RichEditorImageSpanStyleResult
1708 * @syscap SystemCapability.ArkUI.ArkUI.Full
1709 * @since 10
1710 */
1711/**
1712 * Defines the span image style result.
1713 *
1714 * @interface RichEditorImageSpanStyleResult
1715 * @syscap SystemCapability.ArkUI.ArkUI.Full
1716 * @crossplatform
1717 * @atomicservice
1718 * @since arkts {'1.1':'11','1.2':'20'}
1719 * @arkts 1.1&1.2
1720 */
1721declare interface RichEditorImageSpanStyleResult {
1722  /**
1723   * image size.
1724   *
1725   * @type { [number, number] }
1726   * @syscap SystemCapability.ArkUI.ArkUI.Full
1727   * @since 10
1728   */
1729  /**
1730   * image size.
1731   *
1732   * @type { [number, number] }
1733   * @syscap SystemCapability.ArkUI.ArkUI.Full
1734   * @crossplatform
1735   * @atomicservice
1736   * @since arkts {'1.1':'11','1.2':'20'}
1737   * @arkts 1.1&1.2
1738   */
1739  size: [number, number];
1740
1741  /**
1742   * image vertical align.
1743   *
1744   * @type { ImageSpanAlignment }
1745   * @syscap SystemCapability.ArkUI.ArkUI.Full
1746   * @since 10
1747   */
1748  /**
1749   * image vertical align.
1750   *
1751   * @type { ImageSpanAlignment }
1752   * @syscap SystemCapability.ArkUI.ArkUI.Full
1753   * @crossplatform
1754   * @atomicservice
1755   * @since arkts {'1.1':'11','1.2':'20'}
1756   * @arkts 1.1&1.2
1757   */
1758  verticalAlign: ImageSpanAlignment;
1759
1760  /**
1761   * image fit.
1762   *
1763   * @type { ImageFit }
1764   * @syscap SystemCapability.ArkUI.ArkUI.Full
1765   * @since 10
1766   */
1767  /**
1768   * image fit.
1769   *
1770   * @type { ImageFit }
1771   * @syscap SystemCapability.ArkUI.ArkUI.Full
1772   * @crossplatform
1773   * @atomicservice
1774   * @since arkts {'1.1':'11','1.2':'20'}
1775   * @arkts 1.1&1.2
1776   */
1777  objectFit: ImageFit;
1778
1779  /**
1780   * RichEditor ImageSpan Layout Style.
1781   *
1782   * @type { ?RichEditorLayoutStyle }
1783   * @syscap SystemCapability.ArkUI.ArkUI.Full
1784   * @crossplatform
1785   * @atomicservice
1786   * @since arkts {'1.1':'12','1.2':'20'}
1787   * @arkts 1.1&1.2
1788   */
1789  layoutStyle?: RichEditorLayoutStyle;
1790}
1791
1792/**
1793 * Defines the image span.
1794 *
1795 * @interface RichEditorImageSpanResult
1796 * @syscap SystemCapability.ArkUI.ArkUI.Full
1797 * @since 10
1798 */
1799/**
1800 * Defines the image span.
1801 *
1802 * @interface RichEditorImageSpanResult
1803 * @syscap SystemCapability.ArkUI.ArkUI.Full
1804 * @crossplatform
1805 * @atomicservice
1806 * @since arkts {'1.1':'11','1.2':'20'}
1807 * @arkts 1.1&1.2
1808 */
1809declare interface RichEditorImageSpanResult {
1810  /**
1811   * The position of the image span.
1812   *
1813   * @type { RichEditorSpanPosition }
1814   * @syscap SystemCapability.ArkUI.ArkUI.Full
1815   * @since 10
1816   */
1817  /**
1818   * The position of the image span.
1819   *
1820   * @type { RichEditorSpanPosition }
1821   * @syscap SystemCapability.ArkUI.ArkUI.Full
1822   * @crossplatform
1823   * @atomicservice
1824   * @since arkts {'1.1':'11','1.2':'20'}
1825   * @arkts 1.1&1.2
1826   */
1827  spanPosition: RichEditorSpanPosition;
1828
1829  /**
1830   * The pixel map of the image span.
1831   *
1832   * @type { ?PixelMap }
1833   * @syscap SystemCapability.ArkUI.ArkUI.Full
1834   * @since 10
1835   */
1836  /**
1837   * The pixel map of the image span.
1838   *
1839   * @type { ?PixelMap }
1840   * @syscap SystemCapability.ArkUI.ArkUI.Full
1841   * @crossplatform
1842   * @atomicservice
1843   * @since arkts {'1.1':'11','1.2':'20'}
1844   * @arkts 1.1&1.2
1845   */
1846  valuePixelMap?: PixelMap;
1847
1848  /**
1849   * The resource string of the image span.
1850   *
1851   * @type { ?ResourceStr }
1852   * @syscap SystemCapability.ArkUI.ArkUI.Full
1853   * @since 10
1854   */
1855  /**
1856   * The resource string of the image span.
1857   *
1858   * @type { ?ResourceStr }
1859   * @syscap SystemCapability.ArkUI.ArkUI.Full
1860   * @crossplatform
1861   * @atomicservice
1862   * @since arkts {'1.1':'11','1.2':'20'}
1863   * @arkts 1.1&1.2
1864   */
1865  valueResourceStr?: ResourceStr;
1866
1867  /**
1868   * image attribute.
1869   *
1870   * @type { RichEditorImageSpanStyleResult }
1871   * @syscap SystemCapability.ArkUI.ArkUI.Full
1872   * @since 10
1873   */
1874  /**
1875   * image attribute.
1876   *
1877   * @type { RichEditorImageSpanStyleResult }
1878   * @syscap SystemCapability.ArkUI.ArkUI.Full
1879   * @crossplatform
1880   * @atomicservice
1881   * @since arkts {'1.1':'11','1.2':'20'}
1882   * @arkts 1.1&1.2
1883   */
1884  imageStyle: RichEditorImageSpanStyleResult;
1885
1886  /**
1887   * get offset in span.
1888   *
1889   * @type { [number, number] }
1890   * @syscap SystemCapability.ArkUI.ArkUI.Full
1891   * @since 10
1892   */
1893  /**
1894   * get offset in span.
1895   *
1896   * @type { [number, number] }
1897   * @syscap SystemCapability.ArkUI.ArkUI.Full
1898   * @crossplatform
1899   * @atomicservice
1900   * @since arkts {'1.1':'11','1.2':'20'}
1901   * @arkts 1.1&1.2
1902   */
1903  offsetInSpan: [number, number];
1904}
1905
1906/**
1907 * Defines the image span.
1908 *
1909 * @interface RichEditorImageSpan
1910 * @syscap SystemCapability.ArkUI.ArkUI.Full
1911 * @since 10
1912 */
1913/**
1914 * Defines the image span.
1915 *
1916 * @interface RichEditorImageSpan
1917 * @syscap SystemCapability.ArkUI.ArkUI.Full
1918 * @crossplatform
1919 * @atomicservice
1920 * @since arkts {'1.1':'11','1.2':'20'}
1921 * @arkts 1.1&1.2
1922 */
1923declare interface RichEditorImageSpan {
1924  /**
1925   * The position of the image span.
1926   *
1927   * @type { RichEditorSpanPosition }
1928   * @syscap SystemCapability.ArkUI.ArkUI.Full
1929   * @since 10
1930   */
1931  /**
1932   * The position of the image span.
1933   *
1934   * @type { RichEditorSpanPosition }
1935   * @syscap SystemCapability.ArkUI.ArkUI.Full
1936   * @crossplatform
1937   * @atomicservice
1938   * @since arkts {'1.1':'11','1.2':'20'}
1939   * @arkts 1.1&1.2
1940   */
1941  spanPosition: RichEditorSpanPosition;
1942
1943  /**
1944   * The content of the image span.
1945   *
1946   * @type { PixelMap | ResourceStr }
1947   * @syscap SystemCapability.ArkUI.ArkUI.Full
1948   * @since 10
1949   */
1950  /**
1951   * The content of the image span.
1952   *
1953   * @type { PixelMap | ResourceStr }
1954   * @syscap SystemCapability.ArkUI.ArkUI.Full
1955   * @crossplatform
1956   * @atomicservice
1957   * @since arkts {'1.1':'11','1.2':'20'}
1958   * @arkts 1.1&1.2
1959   */
1960  value: PixelMap | ResourceStr;
1961
1962  /**
1963   * image style.
1964   *
1965   * @type { ?RichEditorImageSpanStyle }
1966   * @syscap SystemCapability.ArkUI.ArkUI.Full
1967   * @since 10
1968   */
1969  /**
1970   * image style.
1971   *
1972   * @type { ?RichEditorImageSpanStyle }
1973   * @syscap SystemCapability.ArkUI.ArkUI.Full
1974   * @crossplatform
1975   * @atomicservice
1976   * @since arkts {'1.1':'11','1.2':'20'}
1977   * @arkts 1.1&1.2
1978   */
1979  imageStyle?: RichEditorImageSpanStyle;
1980}
1981
1982/**
1983 * Defines range of RichEditor.
1984 *
1985 * @interface RichEditorRange
1986 * @syscap SystemCapability.ArkUI.ArkUI.Full
1987 * @since 10
1988 */
1989/**
1990 * Defines range of RichEditor.
1991 *
1992 * @interface RichEditorRange
1993 * @syscap SystemCapability.ArkUI.ArkUI.Full
1994 * @crossplatform
1995 * @atomicservice
1996 * @since arkts {'1.1':'11','1.2':'20'}
1997 * @arkts 1.1&1.2
1998 */
1999declare interface RichEditorRange {
2000  /**
2001   * start offset.
2002   *
2003   * @type { ?number }
2004   * @default 0
2005   * @syscap SystemCapability.ArkUI.ArkUI.Full
2006   * @since 10
2007   */
2008  /**
2009   * start offset.
2010   *
2011   * @type { ?number }
2012   * @default 0
2013   * @syscap SystemCapability.ArkUI.ArkUI.Full
2014   * @crossplatform
2015   * @atomicservice
2016   * @since arkts {'1.1':'11','1.2':'20'}
2017   * @arkts 1.1&1.2
2018   */
2019  start?: number;
2020
2021  /**
2022   * end offset.
2023   *
2024   * @type { ?number }
2025   * @default text length
2026   * @syscap SystemCapability.ArkUI.ArkUI.Full
2027   * @since 10
2028   */
2029  /**
2030   * end offset.
2031   *
2032   * @type { ?number }
2033   * @default text length
2034   * @syscap SystemCapability.ArkUI.ArkUI.Full
2035   * @crossplatform
2036   * @atomicservice
2037   * @since arkts {'1.1':'11','1.2':'20'}
2038   * @arkts 1.1&1.2
2039   */
2040  end?: number;
2041}
2042
2043/**
2044 * Defines the richEditor Gestures.
2045 *
2046 * @interface RichEditorGesture
2047 * @syscap SystemCapability.ArkUI.ArkUI.Full
2048 * @crossplatform
2049 * @since 11
2050 */
2051/**
2052 * Defines the richEditor Gestures.
2053 *
2054 * @interface RichEditorGesture
2055 * @syscap SystemCapability.ArkUI.ArkUI.Full
2056 * @crossplatform
2057 * @atomicservice
2058 * @since arkts {'1.1':'12','1.2':'20'}
2059 * @arkts 1.1&1.2
2060 */
2061declare interface RichEditorGesture {
2062  /**
2063   * Trigger a click event when a click is clicked.
2064   *
2065   * @type { ?function }
2066   * @syscap SystemCapability.ArkUI.ArkUI.Full
2067   * @crossplatform
2068   * @since 11
2069   */
2070  /**
2071   * Trigger a click event when a click is clicked.
2072   *
2073   * @type { ?Callback<ClickEvent> }
2074   * @syscap SystemCapability.ArkUI.ArkUI.Full
2075   * @crossplatform
2076   * @atomicservice
2077   * @since arkts {'1.1':'12','1.2':'20'}
2078   * @arkts 1.1&1.2
2079   */
2080  onClick?: Callback<ClickEvent>;
2081
2082  /**
2083   * Trigger a gesture event when long press event is complete.
2084   *
2085   * @type { ?function }
2086   * @syscap SystemCapability.ArkUI.ArkUI.Full
2087   * @crossplatform
2088   * @since 11
2089   */
2090  /**
2091   * Trigger a gesture event when long press event is complete.
2092   *
2093   * @type { ?Callback<GestureEvent> }
2094   * @syscap SystemCapability.ArkUI.ArkUI.Full
2095   * @crossplatform
2096   * @atomicservice
2097   * @since arkts {'1.1':'12','1.2':'20'}
2098   * @arkts 1.1&1.2
2099   */
2100  onLongPress?: Callback<GestureEvent>;
2101
2102  /**
2103   * Trigger a gesture event when a double click event is complete.
2104   *
2105   * @type { ?Callback<GestureEvent> }
2106   * @syscap SystemCapability.ArkUI.ArkUI.Full
2107   * @systemapi
2108   * @since arkts {'1.1':'14','1.2':'20'}
2109   * @arkts 1.1&1.2
2110   */
2111  onDoubleClick?: Callback<GestureEvent>;
2112}
2113
2114/**
2115 * Defines the span options of RichEditor.
2116 *
2117 * @interface RichEditorTextSpanOptions
2118 * @syscap SystemCapability.ArkUI.ArkUI.Full
2119 * @since 10
2120 */
2121/**
2122 * Defines the span options of RichEditor.
2123 *
2124 * @interface RichEditorTextSpanOptions
2125 * @syscap SystemCapability.ArkUI.ArkUI.Full
2126 * @crossplatform
2127 * @atomicservice
2128 * @since arkts {'1.1':'11','1.2':'20'}
2129 * @arkts 1.1&1.2
2130 */
2131declare interface RichEditorTextSpanOptions {
2132  /**
2133   * the offset that add a text span at.
2134   *
2135   * @type { ?number }
2136   * @syscap SystemCapability.ArkUI.ArkUI.Full
2137   * @since 10
2138   */
2139  /**
2140   * the offset that add a text span at.
2141   *
2142   * @type { ?number }
2143   * @syscap SystemCapability.ArkUI.ArkUI.Full
2144   * @crossplatform
2145   * @atomicservice
2146   * @since arkts {'1.1':'11','1.2':'20'}
2147   * @arkts 1.1&1.2
2148   */
2149  offset?: number;
2150
2151  /**
2152   * text style.
2153   *
2154   * @type { ?RichEditorTextStyle }
2155   * @syscap SystemCapability.ArkUI.ArkUI.Full
2156   * @since 10
2157   */
2158  /**
2159   * text style.
2160   *
2161   * @type { ?RichEditorTextStyle }
2162   * @syscap SystemCapability.ArkUI.ArkUI.Full
2163   * @crossplatform
2164   * @atomicservice
2165   * @since arkts {'1.1':'11','1.2':'20'}
2166   * @arkts 1.1&1.2
2167   */
2168  style?: RichEditorTextStyle;
2169
2170  /**
2171   * Paragraph style.
2172   *
2173   * @type { ?RichEditorParagraphStyle }
2174   * @syscap SystemCapability.ArkUI.ArkUI.Full
2175   * @crossplatform
2176   * @since 11
2177   */
2178  /**
2179   * Paragraph style.
2180   *
2181   * @type { ?RichEditorParagraphStyle }
2182   * @syscap SystemCapability.ArkUI.ArkUI.Full
2183   * @crossplatform
2184   * @atomicservice
2185   * @since arkts {'1.1':'12','1.2':'20'}
2186   * @arkts 1.1&1.2
2187   */
2188  paragraphStyle?: RichEditorParagraphStyle;
2189
2190  /**
2191   * RichEditor gesture.
2192   *
2193   * @type { ?RichEditorGesture }
2194   * @syscap SystemCapability.ArkUI.ArkUI.Full
2195   * @crossplatform
2196   * @since 11
2197   */
2198  /**
2199   * RichEditor gesture.
2200   *
2201   * @type { ?RichEditorGesture }
2202   * @syscap SystemCapability.ArkUI.ArkUI.Full
2203   * @crossplatform
2204   * @atomicservice
2205   * @since arkts {'1.1':'12','1.2':'20'}
2206   * @arkts 1.1&1.2
2207   */
2208  gesture?: RichEditorGesture;
2209
2210  /**
2211   * RichEditor url style.
2212   *
2213   * @type { ?RichEditorUrlStyle }
2214   * @syscap SystemCapability.ArkUI.ArkUI.Full
2215   * @crossplatform
2216   * @atomicservice
2217   * @since arkts {'1.1':'19','1.2':'20'}
2218   * @arkts 1.1&1.2
2219   */
2220  urlStyle?: RichEditorUrlStyle;
2221}
2222/**
2223 * Defines the custom keyboard options of RichEditor.
2224 *
2225 * @interface KeyboardOptions
2226 * @syscap SystemCapability.ArkUI.ArkUI.Full
2227 * @crossplatform
2228 * @atomicservice
2229 * @since arkts {'1.1':'12','1.2':'20'}
2230 * @arkts 1.1&1.2
2231 */
2232declare interface KeyboardOptions {
2233  /**
2234   * Indicates whether to support custom keyboard avoidance.
2235   *
2236   * @type { ?boolean }
2237   * @syscap SystemCapability.ArkUI.ArkUI.Full
2238   * @crossplatform
2239   * @atomicservice
2240   * @since arkts {'1.1':'12','1.2':'20'}
2241   * @arkts 1.1&1.2
2242   */
2243  supportAvoidance?: boolean;
2244}
2245
2246/**
2247 * Defines the image span options of RichEditor.
2248 *
2249 * @interface RichEditorImageSpanOptions
2250 * @syscap SystemCapability.ArkUI.ArkUI.Full
2251 * @since 10
2252 */
2253/**
2254 * Defines the image span options of RichEditor.
2255 *
2256 * @interface RichEditorImageSpanOptions
2257 * @syscap SystemCapability.ArkUI.ArkUI.Full
2258 * @crossplatform
2259 * @atomicservice
2260 * @since arkts {'1.1':'11','1.2':'20'}
2261 * @arkts 1.1&1.2
2262 */
2263declare interface RichEditorImageSpanOptions {
2264  /**
2265   * the offset that add image span at.
2266   *
2267   * @type { ?number }
2268   * @syscap SystemCapability.ArkUI.ArkUI.Full
2269   * @since 10
2270   */
2271  /**
2272   * the offset that add image span at.
2273   *
2274   * @type { ?number }
2275   * @syscap SystemCapability.ArkUI.ArkUI.Full
2276   * @crossplatform
2277   * @atomicservice
2278   * @since arkts {'1.1':'11','1.2':'20'}
2279   * @arkts 1.1&1.2
2280   */
2281  offset?: number;
2282
2283  /**
2284   * image style.
2285   *
2286   * @type { ?RichEditorImageSpanStyle }
2287   * @syscap SystemCapability.ArkUI.ArkUI.Full
2288   * @since 10
2289   */
2290  /**
2291   * image style.
2292   *
2293   * @type { ?RichEditorImageSpanStyle }
2294   * @syscap SystemCapability.ArkUI.ArkUI.Full
2295   * @crossplatform
2296   * @atomicservice
2297   * @since arkts {'1.1':'11','1.2':'20'}
2298   * @arkts 1.1&1.2
2299   */
2300  imageStyle?: RichEditorImageSpanStyle;
2301
2302  /**
2303   * RichEditor gesture.
2304   *
2305   * @type { ?RichEditorGesture }
2306   * @syscap SystemCapability.ArkUI.ArkUI.Full
2307   * @crossplatform
2308   * @since 11
2309   */
2310  /**
2311   * RichEditor gesture.
2312   *
2313   * @type { ?RichEditorGesture }
2314   * @syscap SystemCapability.ArkUI.ArkUI.Full
2315   * @crossplatform
2316   * @atomicservice
2317   * @since arkts {'1.1':'12','1.2':'20'}
2318   * @arkts 1.1&1.2
2319   */
2320  gesture?: RichEditorGesture;
2321
2322  /**
2323   * RichEditor onHover.
2324   *
2325   * @type { ?OnHoverCallback }
2326   * @syscap SystemCapability.ArkUI.ArkUI.Full
2327   * @crossplatform
2328   * @atomicservice
2329   * @since arkts {'1.1':'14','1.2':'20'}
2330   * @arkts 1.1&1.2
2331   */
2332  onHover?: OnHoverCallback;
2333}
2334
2335/**
2336 * Defines the builder span options of RichEditor.
2337 *
2338 * @interface RichEditorBuilderSpanOptions
2339 * @syscap SystemCapability.ArkUI.ArkUI.Full
2340 * @crossplatform
2341 * @since 11
2342 */
2343/**
2344 * Defines the builder span options of RichEditor.
2345 *
2346 * @interface RichEditorBuilderSpanOptions
2347 * @syscap SystemCapability.ArkUI.ArkUI.Full
2348 * @crossplatform
2349 * @atomicservice
2350 * @since arkts {'1.1':'12','1.2':'20'}
2351 * @arkts 1.1&1.2
2352 */
2353declare interface RichEditorBuilderSpanOptions {
2354  /**
2355   * The offset that add custom builder span at.
2356   *
2357   * @type { ?number } Indicates the index where the builder will be inserted
2358   * @syscap SystemCapability.ArkUI.ArkUI.Full
2359   * @crossplatform
2360   * @since 11
2361   */
2362  /**
2363   * The offset that add custom builder span at.
2364   *
2365   * @type { ?number } Indicates the index where the builder will be inserted
2366   * @syscap SystemCapability.ArkUI.ArkUI.Full
2367   * @crossplatform
2368   * @atomicservice
2369   * @since arkts {'1.1':'12','1.2':'20'}
2370   * @arkts 1.1&1.2
2371   */
2372  offset?: number;
2373
2374  /**
2375   * builder span drag background color
2376   *
2377   * @type { ?ColorMetrics }
2378   * @syscap SystemCapability.ArkUI.ArkUI.Full
2379   * @systemapi
2380   * @since arkts {'1.1':'18','1.2':'20'}
2381   * @arkts 1.1&1.2
2382   */
2383  dragBackgroundColor? : ColorMetrics;
2384
2385  /**
2386   * builder span drag shadow configuration
2387   *
2388   * @type { ?boolean }
2389   * @syscap SystemCapability.ArkUI.ArkUI.Full
2390   * @systemapi
2391   * @since arkts {'1.1':'18','1.2':'20'}
2392   * @arkts 1.1&1.2
2393   */
2394  isDragShadowNeeded?: boolean;
2395}
2396
2397/**
2398 * Defines the placeholder style.
2399 *
2400 * @interface PlaceholderStyle
2401 * @syscap SystemCapability.ArkUI.ArkUI.Full
2402 * @crossplatform
2403 * @atomicservice
2404 * @since arkts {'1.1':'12','1.2':'20'}
2405 * @arkts 1.1&1.2
2406 */
2407declare interface PlaceholderStyle {
2408  /**
2409   * font.
2410   *
2411   * @type { ?Font }
2412   * @syscap SystemCapability.ArkUI.ArkUI.Full
2413   * @crossplatform
2414   * @atomicservice
2415   * @since arkts {'1.1':'12','1.2':'20'}
2416   * @arkts 1.1&1.2
2417   */
2418  font?: Font;
2419
2420  /**
2421   * fontColor.
2422   *
2423   * @type { ?ResourceColor }
2424   * @syscap SystemCapability.ArkUI.ArkUI.Full
2425   * @crossplatform
2426   * @atomicservice
2427   * @since arkts {'1.1':'12','1.2':'20'}
2428   * @arkts 1.1&1.2
2429   */
2430  fontColor?: ResourceColor;
2431}
2432
2433/**
2434 * Defines span style option of RichEditor.
2435 *
2436 * @extends RichEditorRange
2437 * @interface RichEditorSpanStyleOptions
2438 * @syscap SystemCapability.ArkUI.ArkUI.Full
2439 * @since 10
2440 */
2441/**
2442 * Defines span style option of RichEditor.
2443 *
2444 * @extends RichEditorRange
2445 * @interface RichEditorSpanStyleOptions
2446 * @syscap SystemCapability.ArkUI.ArkUI.Full
2447 * @crossplatform
2448 * @atomicservice
2449 * @since arkts {'1.1':'11','1.2':'20'}
2450 * @arkts 1.1&1.2
2451 */
2452declare interface RichEditorSpanStyleOptions extends RichEditorRange { }
2453
2454/**
2455 * Defines paragraph style option of RichEditor.
2456 *
2457 * @extends RichEditorRange
2458 * @interface RichEditorParagraphStyleOptions
2459 * @syscap SystemCapability.ArkUI.ArkUI.Full
2460 * @crossplatform
2461 * @since 11
2462 */
2463/**
2464 * Defines paragraph style option of RichEditor.
2465 *
2466 * @extends RichEditorRange
2467 * @interface RichEditorParagraphStyleOptions
2468 * @syscap SystemCapability.ArkUI.ArkUI.Full
2469 * @crossplatform
2470 * @atomicservice
2471 * @since arkts {'1.1':'12','1.2':'20'}
2472 * @arkts 1.1&1.2
2473 */
2474declare interface RichEditorParagraphStyleOptions extends RichEditorRange {
2475  /**
2476   * Paragraph style.
2477   *
2478   * @type { RichEditorParagraphStyle }
2479   * @syscap SystemCapability.ArkUI.ArkUI.Full
2480   * @crossplatform
2481   * @since 11
2482   */
2483  /**
2484   * Paragraph style.
2485   *
2486   * @type { RichEditorParagraphStyle }
2487   * @syscap SystemCapability.ArkUI.ArkUI.Full
2488   * @crossplatform
2489   * @atomicservice
2490   * @since arkts {'1.1':'12','1.2':'20'}
2491   * @arkts 1.1&1.2
2492   */
2493  style: RichEditorParagraphStyle;
2494}
2495
2496/**
2497 * Defines text span style option of RichEditor.
2498 *
2499 * @extends RichEditorSpanStyleOptions
2500 * @interface RichEditorUpdateTextSpanStyleOptions
2501 * @syscap SystemCapability.ArkUI.ArkUI.Full
2502 * @since 10
2503 */
2504/**
2505 * Defines text span style option of RichEditor.
2506 *
2507 * @extends RichEditorSpanStyleOptions
2508 * @interface RichEditorUpdateTextSpanStyleOptions
2509 * @syscap SystemCapability.ArkUI.ArkUI.Full
2510 * @crossplatform
2511 * @atomicservice
2512 * @since arkts {'1.1':'11','1.2':'20'}
2513 * @arkts 1.1&1.2
2514 */
2515declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions {
2516  /**
2517   * text style.
2518   *
2519   * @type { RichEditorTextStyle }
2520   * @syscap SystemCapability.ArkUI.ArkUI.Full
2521   * @since 10
2522   */
2523  /**
2524   * text style.
2525   *
2526   * @type { RichEditorTextStyle }
2527   * @syscap SystemCapability.ArkUI.ArkUI.Full
2528   * @crossplatform
2529   * @atomicservice
2530   * @since arkts {'1.1':'11','1.2':'20'}
2531   * @arkts 1.1&1.2
2532   */
2533  textStyle: RichEditorTextStyle;
2534
2535  /**
2536   * RichEditor url style.
2537   *
2538   * @type { ?RichEditorUrlStyle }
2539   * @syscap SystemCapability.ArkUI.ArkUI.Full
2540   * @crossplatform
2541   * @atomicservice
2542   * @since arkts {'1.1':'19','1.2':'20'}
2543   * @arkts 1.1&1.2
2544   */
2545    urlStyle?: RichEditorUrlStyle;
2546}
2547
2548/**
2549 * Defines image span style option of RichEditor.
2550 *
2551 * @extends RichEditorSpanStyleOptions
2552 * @interface RichEditorUpdateImageSpanStyleOptions
2553 * @syscap SystemCapability.ArkUI.ArkUI.Full
2554 * @since 10
2555 */
2556/**
2557 * Defines image span style option of RichEditor.
2558 *
2559 * @extends RichEditorSpanStyleOptions
2560 * @interface RichEditorUpdateImageSpanStyleOptions
2561 * @syscap SystemCapability.ArkUI.ArkUI.Full
2562 * @crossplatform
2563 * @atomicservice
2564 * @since arkts {'1.1':'11','1.2':'20'}
2565 * @arkts 1.1&1.2
2566 */
2567declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions {
2568  /**
2569   * image style.
2570   *
2571   * @type { RichEditorImageSpanStyle }
2572   * @syscap SystemCapability.ArkUI.ArkUI.Full
2573   * @since 10
2574   */
2575  /**
2576   * image style.
2577   *
2578   * @type { RichEditorImageSpanStyle }
2579   * @syscap SystemCapability.ArkUI.ArkUI.Full
2580   * @crossplatform
2581   * @atomicservice
2582   * @since arkts {'1.1':'11','1.2':'20'}
2583   * @arkts 1.1&1.2
2584   */
2585  imageStyle: RichEditorImageSpanStyle;
2586}
2587
2588/**
2589 * Defines symbol span style option of RichEditor.
2590 *
2591 * @extends RichEditorSpanStyleOptions
2592 * @interface RichEditorUpdateSymbolSpanStyleOptions
2593 * @syscap SystemCapability.ArkUI.ArkUI.Full
2594 * @crossplatform
2595 * @since 11
2596 */
2597/**
2598 * Defines symbol span style option of RichEditor.
2599 *
2600 * @extends RichEditorSpanStyleOptions
2601 * @interface RichEditorUpdateSymbolSpanStyleOptions
2602 * @syscap SystemCapability.ArkUI.ArkUI.Full
2603 * @crossplatform
2604 * @atomicservice
2605 * @since arkts {'1.1':'12','1.2':'20'}
2606 * @arkts 1.1&1.2
2607 */
2608declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions {
2609  /**
2610   * Update the symbol span style.
2611   *
2612   * @type { RichEditorSymbolSpanStyle }
2613   * @syscap SystemCapability.ArkUI.ArkUI.Full
2614   * @crossplatform
2615   * @since 11
2616   */
2617  /**
2618   * Update the symbol span style.
2619   *
2620   * @type { RichEditorSymbolSpanStyle }
2621   * @syscap SystemCapability.ArkUI.ArkUI.Full
2622   * @crossplatform
2623   * @atomicservice
2624   * @since arkts {'1.1':'12','1.2':'20'}
2625   * @arkts 1.1&1.2
2626   */
2627  symbolStyle: RichEditorSymbolSpanStyle;
2628}
2629
2630/**
2631 * Defines the symbol span options of RichEditor.
2632 *
2633 * @interface RichEditorSymbolSpanOptions
2634 * @syscap SystemCapability.ArkUI.ArkUI.Full
2635 * @crossplatform
2636 * @since 11
2637 */
2638/**
2639 * Defines the symbol span options of RichEditor.
2640 *
2641 * @interface RichEditorSymbolSpanOptions
2642 * @syscap SystemCapability.ArkUI.ArkUI.Full
2643 * @crossplatform
2644 * @atomicservice
2645 * @since arkts {'1.1':'12','1.2':'20'}
2646 * @arkts 1.1&1.2
2647 */
2648declare interface RichEditorSymbolSpanOptions {
2649  /**
2650   * The offset that add custom symbol span at.
2651   *
2652   * @type { ?number }
2653   * @syscap SystemCapability.ArkUI.ArkUI.Full
2654   * @crossplatform
2655   * @since 11
2656   */
2657  /**
2658   * The offset that add custom symbol span at.
2659   *
2660   * @type { ?number }
2661   * @syscap SystemCapability.ArkUI.ArkUI.Full
2662   * @crossplatform
2663   * @atomicservice
2664   * @since arkts {'1.1':'12','1.2':'20'}
2665   * @arkts 1.1&1.2
2666   */
2667  offset?: number;
2668
2669  /**
2670   * The style that add custom symbol span at.
2671   *
2672   * @type { ?RichEditorSymbolSpanStyle }
2673   * @syscap SystemCapability.ArkUI.ArkUI.Full
2674   * @crossplatform
2675   * @since 11
2676   */
2677  /**
2678   * The style that add custom symbol span at.
2679   *
2680   * @type { ?RichEditorSymbolSpanStyle }
2681   * @syscap SystemCapability.ArkUI.ArkUI.Full
2682   * @crossplatform
2683   * @atomicservice
2684   * @since arkts {'1.1':'12','1.2':'20'}
2685   * @arkts 1.1&1.2
2686   */
2687  style?: RichEditorSymbolSpanStyle;
2688}
2689
2690/**
2691 * Defines the text information for editing.
2692 *
2693 * @interface RichEditorSelection
2694 * @syscap SystemCapability.ArkUI.ArkUI.Full
2695 * @since 10
2696 */
2697/**
2698 * Defines the text information for editing.
2699 *
2700 * @interface RichEditorSelection
2701 * @syscap SystemCapability.ArkUI.ArkUI.Full
2702 * @crossplatform
2703 * @atomicservice
2704 * @since arkts {'1.1':'11','1.2':'20'}
2705 * @arkts 1.1&1.2
2706 */
2707declare interface RichEditorSelection {
2708  /**
2709   * The location info.
2710   *
2711   * @type { [number, number] }
2712   * @syscap SystemCapability.ArkUI.ArkUI.Full
2713   * @since 10
2714   */
2715  /**
2716   * The location info.
2717   *
2718   * @type { [number, number] }
2719   * @syscap SystemCapability.ArkUI.ArkUI.Full
2720   * @crossplatform
2721   * @atomicservice
2722   * @since arkts {'1.1':'11','1.2':'20'}
2723   * @arkts 1.1&1.2
2724   */
2725  selection: [number, number];
2726
2727  /**
2728   * The selected text content.
2729   *
2730   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2731   * @syscap SystemCapability.ArkUI.ArkUI.Full
2732   * @since 10
2733   */
2734  /**
2735   * The selected text content.
2736   *
2737   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2738   * @syscap SystemCapability.ArkUI.ArkUI.Full
2739   * @crossplatform
2740   * @atomicservice
2741   * @since arkts {'1.1':'11','1.2':'20'}
2742   * @arkts 1.1&1.2
2743   */
2744  spans: Array<RichEditorTextSpanResult | RichEditorImageSpanResult>;
2745}
2746
2747/**
2748 * Defines the inserted text value info.
2749 *
2750 * @interface RichEditorInsertValue
2751 * @syscap SystemCapability.ArkUI.ArkUI.Full
2752 * @since 10
2753 */
2754/**
2755 * Defines the inserted text value info.
2756 *
2757 * @interface RichEditorInsertValue
2758 * @syscap SystemCapability.ArkUI.ArkUI.Full
2759 * @crossplatform
2760 * @atomicservice
2761 * @since arkts {'1.1':'11','1.2':'20'}
2762 * @arkts 1.1&1.2
2763 */
2764declare interface RichEditorInsertValue {
2765  /**
2766   * The location info where the value will be inserted.
2767   *
2768   * @type { number }
2769   * @syscap SystemCapability.ArkUI.ArkUI.Full
2770   * @since 10
2771   */
2772  /**
2773   * The location info where the value will be inserted.
2774   *
2775   * @type { number }
2776   * @syscap SystemCapability.ArkUI.ArkUI.Full
2777   * @crossplatform
2778   * @atomicservice
2779   * @since arkts {'1.1':'11','1.2':'20'}
2780   * @arkts 1.1&1.2
2781   */
2782  insertOffset: number;
2783
2784  /**
2785   * The inserted value.
2786   *
2787   * @type { string }
2788   * @syscap SystemCapability.ArkUI.ArkUI.Full
2789   * @since 10
2790   */
2791  /**
2792   * The inserted value.
2793   *
2794   * @type { string }
2795   * @syscap SystemCapability.ArkUI.ArkUI.Full
2796   * @crossplatform
2797   * @atomicservice
2798   * @since arkts {'1.1':'11','1.2':'20'}
2799   * @arkts 1.1&1.2
2800   */
2801  insertValue: string;
2802
2803  /**
2804   * The preview text.
2805   *
2806   * @type { ?string }
2807   * @syscap SystemCapability.ArkUI.ArkUI.Full
2808   * @crossplatform
2809   * @atomicservice
2810   * @since arkts {'1.1':'12','1.2':'20'}
2811   * @arkts 1.1&1.2
2812   */
2813  previewText?: string;
2814}
2815
2816/**
2817 * Provides an interface for deleting value from text.
2818 *
2819 * @interface RichEditorDeleteValue
2820 * @syscap SystemCapability.ArkUI.ArkUI.Full
2821 * @since 10
2822 */
2823/**
2824 * Provides an interface for deleting value from text.
2825 *
2826 * @interface RichEditorDeleteValue
2827 * @syscap SystemCapability.ArkUI.ArkUI.Full
2828 * @crossplatform
2829 * @atomicservice
2830 * @since arkts {'1.1':'11','1.2':'20'}
2831 * @arkts 1.1&1.2
2832 */
2833declare interface RichEditorDeleteValue {
2834  /**
2835   * The offset of deleting.
2836   *
2837   * @type { number }
2838   * @syscap SystemCapability.ArkUI.ArkUI.Full
2839   * @since 10
2840   */
2841  /**
2842   * The offset of deleting.
2843   *
2844   * @type { number }
2845   * @syscap SystemCapability.ArkUI.ArkUI.Full
2846   * @crossplatform
2847   * @atomicservice
2848   * @since arkts {'1.1':'11','1.2':'20'}
2849   * @arkts 1.1&1.2
2850   */
2851  offset: number;
2852
2853  /**
2854   * The deleted direction.
2855   *
2856   * @type { RichEditorDeleteDirection }
2857   * @syscap SystemCapability.ArkUI.ArkUI.Full
2858   * @since 10
2859   */
2860  /**
2861   * The deleted direction.
2862   *
2863   * @type { RichEditorDeleteDirection }
2864   * @syscap SystemCapability.ArkUI.ArkUI.Full
2865   * @crossplatform
2866   * @atomicservice
2867   * @since arkts {'1.1':'11','1.2':'20'}
2868   * @arkts 1.1&1.2
2869   */
2870  direction: RichEditorDeleteDirection;
2871
2872  /**
2873   * The deleted text length.
2874   *
2875   * @type { number }
2876   * @syscap SystemCapability.ArkUI.ArkUI.Full
2877   * @since 10
2878   */
2879  /**
2880   * The deleted text length.
2881   *
2882   * @type { number }
2883   * @syscap SystemCapability.ArkUI.ArkUI.Full
2884   * @crossplatform
2885   * @atomicservice
2886   * @since arkts {'1.1':'11','1.2':'20'}
2887   * @arkts 1.1&1.2
2888   */
2889  length: number;
2890
2891  /**
2892   * The deleted span object.
2893   *
2894   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2895   * @syscap SystemCapability.ArkUI.ArkUI.Full
2896   * @since 10
2897   */
2898  /**
2899   * The deleted span object.
2900   *
2901   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2902   * @syscap SystemCapability.ArkUI.ArkUI.Full
2903   * @crossplatform
2904   * @atomicservice
2905   * @since arkts {'1.1':'11','1.2':'20'}
2906   * @arkts 1.1&1.2
2907   */
2908  richEditorDeleteSpans: Array<RichEditorTextSpanResult | RichEditorImageSpanResult>;
2909}
2910
2911/**
2912 * Provides an interface for changes in the text.
2913 *
2914 * @interface RichEditorChangeValue
2915 * @syscap SystemCapability.ArkUI.ArkUI.Full
2916 * @crossplatform
2917 * @atomicservice
2918 * @since arkts {'1.1':'12','1.2':'20'}
2919 * @arkts 1.1&1.2
2920 */
2921declare interface RichEditorChangeValue {
2922  /**
2923   * Range of content that will be replaced.
2924   *
2925   * @type { TextRange }
2926   * @syscap SystemCapability.ArkUI.ArkUI.Full
2927   * @crossplatform
2928   * @atomicservice
2929   * @since arkts {'1.1':'12','1.2':'20'}
2930   * @arkts 1.1&1.2
2931   */
2932  rangeBefore: TextRange;
2933
2934  /**
2935   * Text spans to replace.
2936   *
2937   * @type { Array<RichEditorTextSpanResult> }
2938   * @syscap SystemCapability.ArkUI.ArkUI.Full
2939   * @crossplatform
2940   * @atomicservice
2941   * @since arkts {'1.1':'12','1.2':'20'}
2942   * @arkts 1.1&1.2
2943   */
2944  replacedSpans: Array<RichEditorTextSpanResult>;
2945
2946  /**
2947   * Image spans to replace.
2948   *
2949   * @type { Array<RichEditorImageSpanResult> }
2950   * @syscap SystemCapability.ArkUI.ArkUI.Full
2951   * @crossplatform
2952   * @atomicservice
2953   * @since arkts {'1.1':'12','1.2':'20'}
2954   * @arkts 1.1&1.2
2955   */
2956  replacedImageSpans: Array<RichEditorImageSpanResult>;
2957
2958  /**
2959   * Symbol spans to replace.
2960   *
2961   * @type { Array<RichEditorTextSpanResult> }
2962   * @syscap SystemCapability.ArkUI.ArkUI.Full
2963   * @crossplatform
2964   * @atomicservice
2965   * @since arkts {'1.1':'12','1.2':'20'}
2966   * @arkts 1.1&1.2
2967   */
2968  replacedSymbolSpans: Array<RichEditorTextSpanResult>;
2969
2970  /**
2971   * The reason for text changes.
2972   *
2973   * @type { ?TextChangeReason }
2974   * @syscap SystemCapability.ArkUI.ArkUI.Full
2975   * @systemapi
2976   * @since 20
2977   */
2978  changeReason?: TextChangeReason;
2979}
2980
2981/**
2982 * Defines the options of RichEditor.
2983 *
2984 * @interface RichEditorOptions
2985 * @syscap SystemCapability.ArkUI.ArkUI.Full
2986 * @since 10
2987 */
2988/**
2989 * Defines the options of RichEditor.
2990 *
2991 * @interface RichEditorOptions
2992 * @syscap SystemCapability.ArkUI.ArkUI.Full
2993 * @crossplatform
2994 * @atomicservice
2995 * @since arkts {'1.1':'11','1.2':'20'}
2996 * @arkts 1.1&1.2
2997 */
2998declare interface RichEditorOptions {
2999  /**
3000   * RichEditor controller.
3001   *
3002   * @type { RichEditorController }
3003   * @syscap SystemCapability.ArkUI.ArkUI.Full
3004   * @since 10
3005   */
3006  /**
3007   * RichEditor controller.
3008   *
3009   * @type { RichEditorController }
3010   * @syscap SystemCapability.ArkUI.ArkUI.Full
3011   * @crossplatform
3012   * @atomicservice
3013   * @since arkts {'1.1':'11','1.2':'20'}
3014   * @arkts 1.1&1.2
3015   */
3016  controller: RichEditorController;
3017}
3018
3019/**
3020 * Defines the options of RichEditor with StyledString.
3021 *
3022 * @interface RichEditorStyledStringOptions
3023 * @syscap SystemCapability.ArkUI.ArkUI.Full
3024 * @crossplatform
3025 * @atomicservice
3026 * @since arkts {'1.1':'12','1.2':'20'}
3027 * @arkts 1.1&1.2
3028 */
3029declare interface RichEditorStyledStringOptions {
3030  /**
3031   * RichEditor controller.
3032   *
3033   * @type { RichEditorStyledStringController }
3034   * @syscap SystemCapability.ArkUI.ArkUI.Full
3035   * @crossplatform
3036   * @atomicservice
3037   * @since arkts {'1.1':'12','1.2':'20'}
3038   * @arkts 1.1&1.2
3039   */
3040  controller: RichEditorStyledStringController;
3041}
3042
3043/**
3044 * Defines the selection menu options.
3045 *
3046 * @interface SelectionMenuOptions
3047 * @syscap SystemCapability.ArkUI.ArkUI.Full
3048 * @crossplatform
3049 * @since 10
3050 */
3051/**
3052 * Defines the selection menu options.
3053 *
3054 * @interface SelectionMenuOptions
3055 * @syscap SystemCapability.ArkUI.ArkUI.Full
3056 * @crossplatform
3057 * @atomicservice
3058 * @since arkts {'1.1':'11','1.2':'20'}
3059 * @arkts 1.1&1.2
3060 */
3061declare interface SelectionMenuOptions {
3062  /**
3063   * Callback function when the selection menu appears.
3064   *
3065   * @type { ?function }
3066   * @syscap SystemCapability.ArkUI.ArkUI.Full
3067   * @crossplatform
3068   * @since 10
3069   */
3070  /**
3071   * Callback function when the selection menu appears.
3072   *
3073   * @type { ?function }
3074   * @syscap SystemCapability.ArkUI.ArkUI.Full
3075   * @crossplatform
3076   * @atomicservice
3077   * @since 11
3078   */
3079  /**
3080   * Callback function when the selection menu appears.
3081   *
3082   * @type { ?MenuOnAppearCallback }
3083   * @syscap SystemCapability.ArkUI.ArkUI.Full
3084   * @crossplatform
3085   * @atomicservice
3086   * @since arkts {'1.1':'12','1.2':'20'}
3087   * @arkts 1.1&1.2
3088   */
3089  onAppear?: MenuOnAppearCallback;
3090
3091  /**
3092   * Callback function when the selection menu disappears.
3093   *
3094   * @type { ?function }
3095   * @syscap SystemCapability.ArkUI.ArkUI.Full
3096   * @crossplatform
3097   * @since 10
3098   */
3099  /**
3100   * Callback function when the selection menu disappears.
3101   *
3102   * @type { ?function }
3103   * @syscap SystemCapability.ArkUI.ArkUI.Full
3104   * @crossplatform
3105   * @atomicservice
3106   * @since 11
3107   */
3108  /**
3109   * Callback function when the selection menu disappears.
3110   *
3111   * @type { ?Callback<void> }
3112   * @syscap SystemCapability.ArkUI.ArkUI.Full
3113   * @crossplatform
3114   * @atomicservice
3115   * @since arkts {'1.1':'12','1.2':'20'}
3116   * @arkts 1.1&1.2
3117   */
3118  onDisappear?: Callback<void>;
3119
3120  /**
3121   * Menu type, default value is MenuType.SELECTION_MENU.
3122   *
3123   * @type { ?MenuType }
3124   * @syscap SystemCapability.ArkUI.ArkUI.Full
3125   * @crossplatform
3126   * @atomicservice
3127   * @since arkts {'1.1':'13','1.2':'20'}
3128   * @arkts 1.1&1.2
3129   */
3130  menuType?: MenuType;
3131
3132  /**
3133   * Callback function when the selection menu is displayed.
3134   *
3135   * @type { ?MenuCallback }
3136   * @syscap SystemCapability.ArkUI.ArkUI.Full
3137   * @crossplatform
3138   * @atomicservice
3139   * @since arkts {'1.1':'15','1.2':'20'}
3140   * @arkts 1.1&1.2
3141   */
3142  onMenuShow?: MenuCallback;
3143
3144  /**
3145   * Callback function when the selection menu is hidden.
3146   *
3147   * @type { ?MenuCallback }
3148   * @syscap SystemCapability.ArkUI.ArkUI.Full
3149   * @crossplatform
3150   * @atomicservice
3151   * @since arkts {'1.1':'15','1.2':'20'}
3152   * @arkts 1.1&1.2
3153   */
3154  onMenuHide?: MenuCallback;
3155
3156  /**
3157   * Defines the preview menu options.
3158   *
3159   * @type { ?PreviewMenuOptions }
3160   * @syscap SystemCapability.ArkUI.ArkUI.Full
3161   * @atomicservice
3162   * @since arkts {'1.1':'18','1.2':'20'}
3163   * @arkts 1.1&1.2
3164   */
3165  previewMenuOptions?: PreviewMenuOptions;
3166}
3167
3168/**
3169 * Defines the preview menu options.
3170 *
3171 * @interface PreviewMenuOptions
3172 * @syscap SystemCapability.ArkUI.ArkUI.Full
3173 * @atomicservice
3174 * @since arkts {'1.1':'18','1.2':'20'}
3175 * @arkts 1.1&1.2
3176 */
3177declare interface PreviewMenuOptions {
3178  /**
3179   * Defines the haptic feedback mode of preview menu.
3180   *
3181   * @type { ?HapticFeedbackMode }
3182   * @syscap SystemCapability.ArkUI.ArkUI.Full
3183   * @atomicservice
3184   * @since arkts {'1.1':'18','1.2':'20'}
3185   * @arkts 1.1&1.2
3186   */
3187  hapticFeedbackMode? : HapticFeedbackMode;
3188}
3189
3190/**
3191 * Provides Base Controller for RichEditor.
3192 *
3193 * @implements TextEditControllerEx
3194 * @syscap SystemCapability.ArkUI.ArkUI.Full
3195 * @crossplatform
3196 * @atomicservice
3197 * @since arkts {'1.1':'12','1.2':'20'}
3198 * @arkts 1.1&1.2
3199 */
3200declare class RichEditorBaseController implements TextEditControllerEx {
3201  /**
3202   * Get caret offset from controller.
3203   *
3204   * @returns { number }
3205   * @syscap SystemCapability.ArkUI.ArkUI.Full
3206   * @since 10
3207   */
3208  /**
3209   * Get caret offset from controller.
3210   *
3211   * @returns { number }
3212   * @syscap SystemCapability.ArkUI.ArkUI.Full
3213   * @crossplatform
3214   * @atomicservice
3215   * @since arkts {'1.1':'11','1.2':'20'}
3216   * @arkts 1.1&1.2
3217   */
3218  getCaretOffset(): number;
3219
3220  /**
3221   * Set caret offset.
3222   *
3223   * @param { number } offset - caret offset.
3224   * @returns { boolean }
3225   * @syscap SystemCapability.ArkUI.ArkUI.Full
3226   * @since 10
3227   */
3228  /**
3229   * Set caret offset.
3230   *
3231   * @param { number } offset - caret offset.
3232   * @returns { boolean }
3233   * @syscap SystemCapability.ArkUI.ArkUI.Full
3234   * @crossplatform
3235   * @atomicservice
3236   * @since arkts {'1.1':'11','1.2':'20'}
3237   * @arkts 1.1&1.2
3238   */
3239  setCaretOffset(offset: number): boolean;
3240
3241  /**
3242   * close the select menu when menu is on.
3243   *
3244   * @syscap SystemCapability.ArkUI.ArkUI.Full
3245   * @since 10
3246   */
3247  /**
3248   * close the select menu when menu is on.
3249   *
3250   * @syscap SystemCapability.ArkUI.ArkUI.Full
3251   * @crossplatform
3252   * @atomicservice
3253   * @since arkts {'1.1':'11','1.2':'20'}
3254   * @arkts 1.1&1.2
3255   */
3256  closeSelectionMenu(): void;
3257
3258  /**
3259   * Get the typing text style.
3260   *
3261   * @returns { RichEditorTextStyle }
3262   * @syscap SystemCapability.ArkUI.ArkUI.Full
3263   * @crossplatform
3264   * @since 11
3265   */
3266  /**
3267   * Get the typing text style.
3268   *
3269   * @returns { RichEditorTextStyle }
3270   * @syscap SystemCapability.ArkUI.ArkUI.Full
3271   * @crossplatform
3272   * @atomicservice
3273   * @since arkts {'1.1':'12','1.2':'20'}
3274   * @arkts 1.1&1.2
3275   */
3276  getTypingStyle(): RichEditorTextStyle;
3277
3278  /**
3279   * Set the typing text style.
3280   *
3281   * @param { RichEditorTextStyle } value - set the typing text style.
3282   * @syscap SystemCapability.ArkUI.ArkUI.Full
3283   * @crossplatform
3284   * @since 11
3285   */
3286  /**
3287   * Set the typing text style.
3288   *
3289   * @param { RichEditorTextStyle } value - set the typing text style.
3290   * @syscap SystemCapability.ArkUI.ArkUI.Full
3291   * @crossplatform
3292   * @atomicservice
3293   * @since arkts {'1.1':'12','1.2':'20'}
3294   * @arkts 1.1&1.2
3295   */
3296  setTypingStyle(value: RichEditorTextStyle): void;
3297
3298  /**
3299   * Set the typing paragraph style.
3300   *
3301   * @param { RichEditorParagraphStyle } style - set the typing paragraph style.
3302   * @syscap SystemCapability.ArkUI.ArkUI.Full
3303   * @crossplatform
3304   * @atomicservice
3305   * @since 20
3306   */
3307  setTypingParagraphStyle(style: RichEditorParagraphStyle): void;
3308
3309  /**
3310   * Text selection is achieved by specifying the start and end positions of the rich editor.
3311   *
3312   * @param { number } selectionStart - The start position of the selected text.
3313   * @param { number } selectionEnd - The end position of the selected text.
3314   * @syscap SystemCapability.ArkUI.ArkUI.Full
3315   * @crossplatform
3316   * @since 11
3317   */
3318  /**
3319   * Specify the start and end positions to select a range of content.
3320   *
3321   * @param { number } selectionStart - The start position of the selected text.
3322   * @param { number } selectionEnd - The end position of the selected text.
3323   * @param { SelectionOptions } [options] - Indicates the options of selection.
3324   * @syscap SystemCapability.ArkUI.ArkUI.Full
3325   * @crossplatform
3326   * @atomicservice
3327   * @since arkts {'1.1':'12','1.2':'20'}
3328   * @arkts 1.1&1.2
3329   */
3330  setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void;
3331
3332  /**
3333   * Judge whether is in editing state
3334   *
3335   * @returns { boolean } - true is editing state, false is non editing status
3336   * @syscap SystemCapability.ArkUI.ArkUI.Full
3337   * @crossplatform
3338   * @atomicservice
3339   * @since arkts {'1.1':'12','1.2':'20'}
3340   * @arkts 1.1&1.2
3341   */
3342  isEditing(): boolean;
3343
3344  /**
3345   * Stop editing state.
3346   *
3347   * @syscap SystemCapability.ArkUI.ArkUI.Full
3348   * @crossplatform
3349   * @atomicservice
3350   * @since arkts {'1.1':'12','1.2':'20'}
3351   * @arkts 1.1&1.2
3352   */
3353  stopEditing(): void;
3354
3355  /**
3356   * Get LayoutManager.
3357   *
3358   * @returns { LayoutManager } - Return the LayoutManager.
3359   * @syscap SystemCapability.ArkUI.ArkUI.Full
3360   * @crossplatform
3361   * @atomicservice
3362   * @since arkts {'1.1':'12','1.2':'20'}
3363   * @arkts 1.1&1.2
3364   */
3365  getLayoutManager(): LayoutManager;
3366
3367  /**
3368   * Get PreviewText.
3369   *
3370   * @returns { PreviewText } - Return the PreviewText.
3371   * @syscap SystemCapability.ArkUI.ArkUI.Full
3372   * @crossplatform
3373   * @atomicservice
3374   * @since arkts {'1.1':'12','1.2':'20'}
3375   * @arkts 1.1&1.2
3376   */
3377  getPreviewText(): PreviewText;
3378
3379  /**
3380   * Get CaretRect.
3381   *
3382   * @returns { RectResult | undefined } - Return the caret rect or undefined value.
3383   * @syscap SystemCapability.ArkUI.ArkUI.Full
3384   * @crossplatform
3385   * @atomicservice
3386   * @since arkts {'1.1':'18','1.2':'20'}
3387   * @arkts 1.1&1.2
3388   */
3389  getCaretRect(): RectResult | undefined;
3390}
3391
3392/**
3393 * Provides Controller for RichEditor.
3394 *
3395 * @syscap SystemCapability.ArkUI.ArkUI.Full
3396 * @since 10
3397 */
3398/**
3399 * Provides Controller for RichEditor.
3400 *
3401 * @syscap SystemCapability.ArkUI.ArkUI.Full
3402 * @crossplatform
3403 * @atomicservice
3404 * @since 11
3405 */
3406/**
3407 * Provides Controller for RichEditor.
3408 *
3409 * @extends RichEditorBaseController
3410 * @syscap SystemCapability.ArkUI.ArkUI.Full
3411 * @crossplatform
3412 * @atomicservice
3413 * @since arkts {'1.1':'12','1.2':'20'}
3414 * @arkts 1.1&1.2
3415 */
3416declare class RichEditorController extends RichEditorBaseController {
3417  /**
3418   * Add a text span.
3419   *
3420   * @param { string } value - text value.
3421   * @param { RichEditorTextSpanOptions } [options] - span info.
3422   * @returns { number } span index
3423   * @syscap SystemCapability.ArkUI.ArkUI.Full
3424   * @since 10
3425   */
3426  /**
3427   * Add a text span.
3428   *
3429   * @param { string } value - text value.
3430   * @param { RichEditorTextSpanOptions } [options] - span info.
3431   * @returns { number } span index
3432   * @syscap SystemCapability.ArkUI.ArkUI.Full
3433   * @crossplatform
3434   * @atomicservice
3435   * @since 11
3436   */
3437  /**
3438   * Add a text span.
3439   *
3440   * @param { ResourceStr } content - text value.
3441   * @param { RichEditorTextSpanOptions } [options] - span info.
3442   * @returns { number } span index
3443   * @syscap SystemCapability.ArkUI.ArkUI.Full
3444   * @crossplatform
3445   * @atomicservice
3446   * @since 20
3447   * @arkts 1.1&1.2
3448   */
3449  addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number;
3450
3451  /**
3452   * Add a image span.
3453   *
3454   * @param { PixelMap | ResourceStr } value - image value.
3455   * @param { RichEditorImageSpanOptions } [options] - image span info.
3456   * @returns { number } span index
3457   * @syscap SystemCapability.ArkUI.ArkUI.Full
3458   * @since 10
3459   */
3460  /**
3461   * Add a image span.
3462   *
3463   * @param { PixelMap | ResourceStr } value - image value.
3464   * @param { RichEditorImageSpanOptions } [options] - image span info.
3465   * @returns { number } span index
3466   * @syscap SystemCapability.ArkUI.ArkUI.Full
3467   * @crossplatform
3468   * @atomicservice
3469   * @since arkts {'1.1':'11','1.2':'20'}
3470   * @arkts 1.1&1.2
3471   */
3472  addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number;
3473
3474  /**
3475   * Add a builder span.
3476   *
3477   * @param { CustomBuilder } value - Indicates the custom builder node
3478   * @param { RichEditorBuilderSpanOptions } [options] - span option.
3479   * @returns { number } span index
3480   * @syscap SystemCapability.ArkUI.ArkUI.Full
3481   * @crossplatform
3482   * @since 11
3483   */
3484  /**
3485   * Add a builder span.
3486   *
3487   * @param { CustomBuilder } value - Indicates the custom builder node
3488   * @param { RichEditorBuilderSpanOptions } [options] - span option.
3489   * @returns { number } span index
3490   * @syscap SystemCapability.ArkUI.ArkUI.Full
3491   * @crossplatform
3492   * @atomicservice
3493   * @since arkts {'1.1':'12','1.2':'20'}
3494   * @arkts 1.1&1.2
3495   */
3496  addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number;
3497
3498  /**
3499   * Add a symbol span.
3500   *
3501   * @param { Resource } value - symbol span value
3502   * @param { RichEditorSymbolSpanOptions } [options] - symbol span option.
3503   * @returns { number } symbol span index
3504   * @syscap SystemCapability.ArkUI.ArkUI.Full
3505   * @crossplatform
3506   * @since 11
3507   */
3508  /**
3509   * Add a symbol span.
3510   *
3511   * @param { Resource } value - symbol span value
3512   * @param { RichEditorSymbolSpanOptions } [options] - symbol span option.
3513   * @returns { number } symbol span index
3514   * @syscap SystemCapability.ArkUI.ArkUI.Full
3515   * @crossplatform
3516   * @atomicservice
3517   * @since arkts {'1.1':'12','1.2':'20'}
3518   * @arkts 1.1&1.2
3519   */
3520  addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number;
3521
3522  /**
3523   * Modify span style.
3524   *
3525   * @param { RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions } value
3526   * @syscap SystemCapability.ArkUI.ArkUI.Full
3527   * @since 10
3528   */
3529  /**
3530   * Modify span style.
3531   *
3532   * @param { RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions } value
3533   * @syscap SystemCapability.ArkUI.ArkUI.Full
3534   * @crossplatform
3535   * @atomicservice
3536   * @since arkts {'1.1':'11','1.2':'20'}
3537   * @arkts 1.1&1.2
3538   */
3539  updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void;
3540
3541  /**
3542   * Modify span style.
3543   *
3544   * @param { RichEditorParagraphStyleOptions } value
3545   * @syscap SystemCapability.ArkUI.ArkUI.Full
3546   * @crossplatform
3547   * @since 11
3548   */
3549  /**
3550   * Modify span style.
3551   *
3552   * @param { RichEditorParagraphStyleOptions } value
3553   * @syscap SystemCapability.ArkUI.ArkUI.Full
3554   * @crossplatform
3555   * @atomicservice
3556   * @since arkts {'1.1':'12','1.2':'20'}
3557   * @arkts 1.1&1.2
3558   */
3559  updateParagraphStyle(value: RichEditorParagraphStyleOptions): void;
3560
3561  /**
3562   * Delete span.
3563   *
3564   * @param { RichEditorRange } [value] - range for deleting.
3565   * @syscap SystemCapability.ArkUI.ArkUI.Full
3566   * @since 10
3567   */
3568  /**
3569   * Delete span.
3570   *
3571   * @param { RichEditorRange } [value] - range for deleting.
3572   * @syscap SystemCapability.ArkUI.ArkUI.Full
3573   * @crossplatform
3574   * @atomicservice
3575   * @since arkts {'1.1':'11','1.2':'20'}
3576   * @arkts 1.1&1.2
3577   */
3578  deleteSpans(value?: RichEditorRange): void;
3579
3580  /**
3581   * Get span content.
3582   *
3583   * @param { RichEditorRange } [value] - range for getting span info.
3584   * @returns { Array<RichEditorImageSpanResult | RichEditorTextSpanResult> }
3585   * @syscap SystemCapability.ArkUI.ArkUI.Full
3586   * @since 10
3587   */
3588  /**
3589   * Get span content.
3590   *
3591   * @param { RichEditorRange } [value] - range for getting span info.
3592   * @returns { Array<RichEditorImageSpanResult | RichEditorTextSpanResult> }
3593   * @syscap SystemCapability.ArkUI.ArkUI.Full
3594   * @crossplatform
3595   * @atomicservice
3596   * @since arkts {'1.1':'11','1.2':'20'}
3597   * @arkts 1.1&1.2
3598   */
3599  getSpans(value?: RichEditorRange): Array<RichEditorImageSpanResult | RichEditorTextSpanResult>;
3600
3601  /**
3602   * Get span content.
3603   *
3604   * @param { RichEditorRange } [value] - range for getting span info.
3605   * @returns { Array<RichEditorParagraphResult> }
3606   * @syscap SystemCapability.ArkUI.ArkUI.Full
3607   * @crossplatform
3608   * @since 11
3609   */
3610  /**
3611   * Get span content.
3612   *
3613   * @param { RichEditorRange } [value] - range for getting span info.
3614   * @returns { Array<RichEditorParagraphResult> }
3615   * @syscap SystemCapability.ArkUI.ArkUI.Full
3616   * @crossplatform
3617   * @atomicservice
3618   * @since arkts {'1.1':'12','1.2':'20'}
3619   * @arkts 1.1&1.2
3620   */
3621  getParagraphs(value?: RichEditorRange): Array<RichEditorParagraphResult>;
3622
3623  /**
3624   * Called when the content is selected.
3625   *
3626   * @returns { RichEditorSelection }
3627   * @syscap SystemCapability.ArkUI.ArkUI.Full
3628   * @crossplatform
3629   * @since 11
3630   */
3631  /**
3632   * Called when the content is selected.
3633   *
3634   * @returns { RichEditorSelection }
3635   * @syscap SystemCapability.ArkUI.ArkUI.Full
3636   * @crossplatform
3637   * @atomicservice
3638   * @since arkts {'1.1':'12','1.2':'20'}
3639   * @arkts 1.1&1.2
3640   */
3641  getSelection(): RichEditorSelection;
3642
3643  /**
3644   * Convert StyledString to spans in rich editor.
3645   * return a empty Array<RichEditorSpan> if convert failed
3646   *
3647   * @param { StyledString } value - StyledString.
3648   * @returns { Array<RichEditorSpan> }
3649   * @throws { BusinessError } 401 - The parameter check failed.
3650   * @syscap SystemCapability.ArkUI.ArkUI.Full
3651   * @crossplatform
3652   * @atomicservice
3653   * @since arkts {'1.1':'12','1.2':'20'}
3654   * @arkts 1.1&1.2
3655   */
3656  fromStyledString(value: StyledString): Array<RichEditorSpan>;
3657
3658  /**
3659   * Convert spans to StyledString in rich editor.
3660   * return a empty StyledString if convert failed
3661   *
3662   * @param { RichEditorRange } value - range of spans in rich editor
3663   * @returns { StyledString }
3664   * @throws { BusinessError } 401 - The parameter check failed.
3665   * @syscap SystemCapability.ArkUI.ArkUI.Full
3666   * @crossplatform
3667   * @atomicservice
3668   * @since arkts {'1.1':'12','1.2':'20'}
3669   * @arkts 1.1&1.2
3670   */
3671    toStyledString(value: RichEditorRange): StyledString;
3672}
3673
3674/**
3675 * Defines the types of spans in rich editor.
3676 *
3677 * @typedef { RichEditorImageSpanResult | RichEditorTextSpanResult } RichEditorSpan
3678 * @syscap SystemCapability.ArkUI.ArkUI.Full
3679 * @crossplatform
3680 * @atomicservice
3681 * @since arkts {'1.1':'12','1.2':'20'}
3682 * @arkts 1.1&1.2
3683 */
3684declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult;
3685
3686/**
3687 * Provides Controller for RichEditor with StyledString.
3688 *
3689 * @extends RichEditorBaseController
3690 * @implements StyledStringController
3691 * @syscap SystemCapability.ArkUI.ArkUI.Full
3692 * @crossplatform
3693 * @atomicservice
3694 * @since arkts {'1.1':'12','1.2':'20'}
3695 * @arkts 1.1&1.2
3696 */
3697declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController {
3698  /**
3699   * Set the StyledString of the RichEditor.
3700   *
3701   * @param { StyledString } styledString - StyledString.
3702   * @syscap SystemCapability.ArkUI.ArkUI.Full
3703   * @crossplatform
3704   * @atomicservice
3705   * @since arkts {'1.1':'12','1.2':'20'}
3706   * @arkts 1.1&1.2
3707   */
3708  setStyledString(styledString: StyledString): void;
3709
3710  /**
3711   * Get the StyledString of the RichEditor.
3712   *
3713   * @returns { MutableStyledString }
3714   * @syscap SystemCapability.ArkUI.ArkUI.Full
3715   * @atomicservice
3716   * @since 12
3717   */
3718  /**
3719   * Get the StyledString of the RichEditor.
3720   *
3721   * @returns { MutableStyledString }
3722   * @syscap SystemCapability.ArkUI.ArkUI.Full
3723   * @crossplatform
3724   * @atomicservice
3725   * @since 20
3726   * @arkts 1.1&1.2
3727   */
3728  getStyledString(): MutableStyledString;
3729
3730  /**
3731   * Get the selection in the StyledString of the RichEditor.
3732   *
3733   * @returns { RichEditorRange }
3734   * @syscap SystemCapability.ArkUI.ArkUI.Full
3735   * @crossplatform
3736   * @atomicservice
3737   * @since arkts {'1.1':'12','1.2':'20'}
3738   * @arkts 1.1&1.2
3739   */
3740  getSelection(): RichEditorRange;
3741
3742  /**
3743   * Register content changed listener
3744   *
3745   * @param { StyledStringChangedListener } listener - content changed listener.
3746   * @syscap SystemCapability.ArkUI.ArkUI.Full
3747   * @crossplatform
3748   * @atomicservice
3749   * @since arkts {'1.1':'12','1.2':'20'}
3750   * @arkts 1.1&1.2
3751   */
3752  onContentChanged(listener: StyledStringChangedListener): void;
3753}
3754
3755/**
3756 * Provides attribute for RichEditor.
3757 *
3758 * @extends CommonMethod<RichEditorAttribute>
3759 * @syscap SystemCapability.ArkUI.ArkUI.Full
3760 * @since 10
3761 */
3762/**
3763 * Provides attribute for RichEditor.
3764 *
3765 * @extends CommonMethod<RichEditorAttribute>
3766 * @syscap SystemCapability.ArkUI.ArkUI.Full
3767 * @crossplatform
3768 * @atomicservice
3769 * @since arkts {'1.1':'11','1.2':'20'}
3770 * @arkts 1.1&1.2
3771 */
3772declare class RichEditorAttribute extends CommonMethod<RichEditorAttribute> {
3773  /**
3774   * Called when on ready.
3775   *
3776   * @param { function } callback - The triggered function when rich editor is ready.
3777   * @returns { RichEditorAttribute }
3778   * @syscap SystemCapability.ArkUI.ArkUI.Full
3779   * @since 10
3780   */
3781  /**
3782   * Called when on ready.
3783   *
3784   * @param { function } callback - The triggered function when rich editor is ready.
3785   * @returns { RichEditorAttribute }
3786   * @syscap SystemCapability.ArkUI.ArkUI.Full
3787   * @crossplatform
3788   * @atomicservice
3789   * @since 11
3790   */
3791  /**
3792   * Called when on ready.
3793   *
3794   * @param { Callback<void> } callback - The triggered function when rich editor is ready.
3795   * @returns { RichEditorAttribute }
3796   * @syscap SystemCapability.ArkUI.ArkUI.Full
3797   * @crossplatform
3798   * @atomicservice
3799   * @since arkts {'1.1':'12','1.2':'20'}
3800   * @arkts 1.1&1.2
3801   */
3802  onReady(callback: Callback<void>): RichEditorAttribute;
3803
3804  /**
3805   * Called when the content is selected.
3806   *
3807   * @param { function } callback - The triggered function when select text.
3808   * @returns { RichEditorAttribute }
3809   * @syscap SystemCapability.ArkUI.ArkUI.Full
3810   * @since 10
3811   */
3812  /**
3813   * Called when the content is selected.
3814   *
3815   * @param { function } callback - The triggered function when select text.
3816   * @returns { RichEditorAttribute }
3817   * @syscap SystemCapability.ArkUI.ArkUI.Full
3818   * @crossplatform
3819   * @atomicservice
3820   * @since 11
3821   */
3822  /**
3823   * Called when the content is selected.
3824   *
3825   * @param { Callback<RichEditorSelection> } callback - The triggered function when select text.
3826   * @returns { RichEditorAttribute }
3827   * @syscap SystemCapability.ArkUI.ArkUI.Full
3828   * @crossplatform
3829   * @atomicservice
3830   * @since arkts {'1.1':'12','1.2':'20'}
3831   * @arkts 1.1&1.2
3832   */
3833  onSelect(callback: Callback<RichEditorSelection>): RichEditorAttribute;
3834
3835  /**
3836   * Called when selection range or caret position is changed.
3837   *
3838   * @param { Callback<RichEditorRange> } callback - The triggered function when change selection range or caret position.
3839   * @returns { RichEditorAttribute }
3840   * @syscap SystemCapability.ArkUI.ArkUI.Full
3841   * @crossplatform
3842   * @atomicservice
3843   * @since arkts {'1.1':'12','1.2':'20'}
3844   * @arkts 1.1&1.2
3845   */
3846  onSelectionChange(callback: Callback<RichEditorRange>): RichEditorAttribute;
3847
3848  /**
3849   * Get text value information when about to input.
3850   *
3851   * @param { function } callback - The triggered function when text content is about to insert.
3852   * @returns { RichEditorAttribute }
3853   * @syscap SystemCapability.ArkUI.ArkUI.Full
3854   * @since 10
3855   */
3856  /**
3857   * Get text value information when about to input.
3858   *
3859   * @param { function } callback - The triggered function when text content is about to insert.
3860   * @returns { RichEditorAttribute }
3861   * @syscap SystemCapability.ArkUI.ArkUI.Full
3862   * @crossplatform
3863   * @atomicservice
3864   * @since 11
3865   */
3866  /**
3867   * Get text value information when about to input.
3868   *
3869   * @param { Callback<RichEditorInsertValue, boolean> } callback - The triggered function when text content is about to insert.
3870   * @returns { RichEditorAttribute }
3871   * @syscap SystemCapability.ArkUI.ArkUI.Full
3872   * @crossplatform
3873   * @atomicservice
3874   * @since arkts {'1.1':'12','1.2':'20'}
3875   * @arkts 1.1&1.2
3876   */
3877  aboutToIMEInput(callback: Callback<RichEditorInsertValue, boolean>): RichEditorAttribute;
3878
3879  /**
3880   * Get text value information when completed input.
3881   *
3882   * @param { function } callback - The triggered function when text content has been inserted.
3883   * @returns { RichEditorAttribute }
3884   * @syscap SystemCapability.ArkUI.ArkUI.Full
3885   * @since 10
3886   */
3887  /**
3888   * Get text value information when completed input.
3889   *
3890   * @param { function } callback - The triggered function when text content has been inserted.
3891   * @returns { RichEditorAttribute }
3892   * @syscap SystemCapability.ArkUI.ArkUI.Full
3893   * @crossplatform
3894   * @atomicservice
3895   * @since 11
3896   */
3897  /**
3898   * Get text value information when completed input.
3899   *
3900   * @param { Callback<RichEditorTextSpanResult> } callback - The triggered function when text content has been inserted.
3901   * @returns { RichEditorAttribute }
3902   * @syscap SystemCapability.ArkUI.ArkUI.Full
3903   * @crossplatform
3904   * @atomicservice
3905   * @since arkts {'1.1':'12','1.2':'20'}
3906   * @arkts 1.1&1.2
3907   */
3908  onIMEInputComplete(callback: Callback<RichEditorTextSpanResult>): RichEditorAttribute;
3909
3910  /**
3911   * Called when ime input complete.
3912   *
3913   * @param { Callback<TextRange> } callback - The triggered function when text content has been inserted.
3914   * @returns { RichEditorAttribute }
3915   * @syscap SystemCapability.ArkUI.ArkUI.Full
3916   * @crossplatform
3917   * @atomicservice
3918   * @since arkts {'1.1':'12','1.2':'20'}
3919   * @arkts 1.1&1.2
3920   */
3921  onDidIMEInput(callback: Callback<TextRange>): RichEditorAttribute;
3922
3923  /**
3924   * Get text value information when about to delete.
3925   *
3926   * @param { function } callback - The triggered function when text content is about to delete.
3927   * @returns { RichEditorAttribute }
3928   * @syscap SystemCapability.ArkUI.ArkUI.Full
3929   * @since 10
3930   */
3931  /**
3932   * Get text value information when about to delete.
3933   *
3934   * @param { function } callback - The triggered function when text content is about to delete.
3935   * @returns { RichEditorAttribute }
3936   * @syscap SystemCapability.ArkUI.ArkUI.Full
3937   * @crossplatform
3938   * @atomicservice
3939   * @since 11
3940   */
3941  /**
3942   * Get text value information when about to delete.
3943   *
3944   * @param { Callback<RichEditorDeleteValue, boolean> } callback - The triggered function when text content is about to delete.
3945   * @returns { RichEditorAttribute }
3946   * @syscap SystemCapability.ArkUI.ArkUI.Full
3947   * @crossplatform
3948   * @atomicservice
3949   * @since arkts {'1.1':'12','1.2':'20'}
3950   * @arkts 1.1&1.2
3951   */
3952  aboutToDelete(callback: Callback<RichEditorDeleteValue, boolean>): RichEditorAttribute;
3953
3954  /**
3955   * Notify that the deletion has been completed
3956   *
3957   * @param { function } callback - The triggered function when text content has been deleted.
3958   * @returns { RichEditorAttribute }
3959   * @syscap SystemCapability.ArkUI.ArkUI.Full
3960   * @since 10
3961   */
3962  /**
3963   * Notify that the deletion has been completed
3964   *
3965   * @param { function } callback - The triggered function when text content has been deleted.
3966   * @returns { RichEditorAttribute }
3967   * @syscap SystemCapability.ArkUI.ArkUI.Full
3968   * @crossplatform
3969   * @atomicservice
3970   * @since 11
3971   */
3972  /**
3973   * Notify that the deletion has been completed
3974   *
3975   * @param { Callback<void> } callback - The triggered function when text content has been deleted.
3976   * @returns { RichEditorAttribute }
3977   * @syscap SystemCapability.ArkUI.ArkUI.Full
3978   * @crossplatform
3979   * @atomicservice
3980   * @since arkts {'1.1':'12','1.2':'20'}
3981   * @arkts 1.1&1.2
3982   */
3983  onDeleteComplete(callback: Callback<void>): RichEditorAttribute;
3984
3985  /**
3986   * Allow replication.
3987   *
3988   * @param { CopyOptions } value - Indicates the type of copy option.
3989   * @returns { RichEditorAttribute }
3990   * @syscap SystemCapability.ArkUI.ArkUI.Full
3991   * @crossplatform
3992   * @since 10
3993   */
3994  /**
3995   * Allow replication.
3996   *
3997   * @param { CopyOptions } value - Indicates the type of copy option.
3998   * @returns { RichEditorAttribute }
3999   * @syscap SystemCapability.ArkUI.ArkUI.Full
4000   * @crossplatform
4001   * @atomicservice
4002   * @since arkts {'1.1':'11','1.2':'20'}
4003   * @arkts 1.1&1.2
4004   */
4005  copyOptions(value: CopyOptions): RichEditorAttribute;
4006
4007  /**
4008   * Bind to the selection menu.
4009   *
4010   * @param { RichEditorSpanType } spanType - Indicates the type of selection menu.
4011   * @param { CustomBuilder } content - Indicates the content of selection menu.
4012   * @param { ResponseType } responseType - Indicates response type of selection menu.
4013   * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu.
4014   * @returns { RichEditorAttribute }
4015   * @syscap SystemCapability.ArkUI.ArkUI.Full
4016   * @crossplatform
4017   * @since 10
4018   */
4019  /**
4020   * Bind to the selection menu.
4021   *
4022   * @param { RichEditorSpanType } spanType - Indicates the type of selection menu.
4023   * @param { CustomBuilder } content - Indicates the content of selection menu.
4024   * @param { ResponseType | RichEditorResponseType } responseType - Indicates response type of selection menu.
4025   * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu.
4026   * @returns { RichEditorAttribute }
4027   * @syscap SystemCapability.ArkUI.ArkUI.Full
4028   * @crossplatform
4029   * @atomicservice
4030   * @since arkts {'1.1':'11','1.2':'20'}
4031   * @arkts 1.1&1.2
4032   */
4033  bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType,
4034    options?: SelectionMenuOptions): RichEditorAttribute;
4035
4036  /**
4037   * Define custom keyboard.
4038   *
4039   * @param { CustomBuilder } value
4040   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4041   * @syscap SystemCapability.ArkUI.ArkUI.Full
4042   * @since 10
4043   */
4044  /**
4045   * Define custom keyboard.
4046   *
4047   * @param { CustomBuilder } value
4048   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4049   * @syscap SystemCapability.ArkUI.ArkUI.Full
4050   * @crossplatform
4051   * @atomicservice
4052   * @since 11
4053   */
4054  /**
4055   * Define custom keyboard.
4056   *
4057   * @param { CustomBuilder } value - Set up a custom keyboard of RichEditor
4058   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of RichEditor
4059   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4060   * @syscap SystemCapability.ArkUI.ArkUI.Full
4061   * @crossplatform
4062   * @atomicservice
4063   * @since arkts {'1.1':'12','1.2':'20'}
4064   * @arkts 1.1&1.2
4065   */
4066  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute;
4067
4068  /**
4069    * Defines onPaste callback.
4070    *
4071    * @param { function } callback Executed when a paste operation is performed.
4072    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4073    * @syscap SystemCapability.ArkUI.ArkUI.Full
4074    * @crossplatform
4075    * @since 11
4076    */
4077   /**
4078    * Defines onPaste callback.
4079    *
4080    * @param { PasteEventCallback } callback Executed when a paste operation is performed.
4081    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4082    * @syscap SystemCapability.ArkUI.ArkUI.Full
4083    * @crossplatform
4084    * @atomicservice
4085   * @since arkts {'1.1':'12','1.2':'20'}
4086   * @arkts 1.1&1.2
4087    */
4088  onPaste(callback: PasteEventCallback): RichEditorAttribute;
4089
4090  /**
4091   * Enable data detector.
4092   *
4093   * @param { boolean } enable - Enable data detector.
4094   * @returns { RichEditorAttribute } The attribute of the rich editor.
4095   * @syscap SystemCapability.ArkUI.ArkUI.Full
4096   * @crossplatform
4097   * @since 11
4098   */
4099  /**
4100   * Enable data detector.
4101   *
4102   * @param { boolean } enable - Enable data detector.
4103   * @returns { RichEditorAttribute } The attribute of the rich editor.
4104   * @syscap SystemCapability.ArkUI.ArkUI.Full
4105   * @crossplatform
4106   * @atomicservice
4107   * @since arkts {'1.1':'12','1.2':'20'}
4108   * @arkts 1.1&1.2
4109   */
4110  enableDataDetector(enable: boolean): RichEditorAttribute;
4111
4112  /**
4113   * Enable preview text.
4114   *
4115   * @param { boolean } enable - Enable preview text.
4116   * @returns { RichEditorAttribute } The attribute of the rich editor.
4117   * @syscap SystemCapability.ArkUI.ArkUI.Full
4118   * @crossplatform
4119   * @atomicservice
4120   * @since arkts {'1.1':'12','1.2':'20'}
4121   * @arkts 1.1&1.2
4122   */
4123  enablePreviewText(enable: boolean): RichEditorAttribute;
4124
4125  /**
4126   * Data detector with config.
4127   *
4128   * @param { TextDataDetectorConfig } config - The config of text data detector.
4129   * @returns { RichEditorAttribute } The attribute of the rich editor.
4130   * @syscap SystemCapability.ArkUI.ArkUI.Full
4131   * @crossplatform
4132   * @since 11
4133   */
4134  /**
4135   * Data detector with config.
4136   *
4137   * @param { TextDataDetectorConfig } config - The config of text data detector.
4138   * @returns { RichEditorAttribute } The attribute of the rich editor.
4139   * @syscap SystemCapability.ArkUI.ArkUI.Full
4140   * @crossplatform
4141   * @atomicservice
4142   * @since arkts {'1.1':'12','1.2':'20'}
4143   * @arkts 1.1&1.2
4144   */
4145  dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute;
4146
4147  /**
4148   * Set richEditor placeholder.
4149   *
4150   * @param { ResourceStr } value - The value of placeholder.
4151   * @param { PlaceholderStyle } [style] - The style of placeholder.
4152   * @returns { RichEditorAttribute } The attribute of the rich editor.
4153   * @syscap SystemCapability.ArkUI.ArkUI.Full
4154   * @crossplatform
4155   * @atomicservice
4156   * @since arkts {'1.1':'12','1.2':'20'}
4157   * @arkts 1.1&1.2
4158   */
4159  placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute;
4160
4161   /**
4162   * Set caret color of rich editor.
4163   *
4164   * @param { ResourceColor } value - Custom color types.
4165   * @returns { RichEditorAttribute } The attribute of the rich editor.
4166   * @syscap SystemCapability.ArkUI.ArkUI.Full
4167   * @crossplatform
4168   * @atomicservice
4169   * @since arkts {'1.1':'12','1.2':'20'}
4170   * @arkts 1.1&1.2
4171   */
4172  caretColor(value: ResourceColor): RichEditorAttribute;
4173
4174  /**
4175   * Set background color of selected text in rich editor.
4176   *
4177   * @param { ResourceColor } value - Custom color types.
4178   * @returns { RichEditorAttribute } The attribute of the rich editor.
4179   * @syscap SystemCapability.ArkUI.ArkUI.Full
4180   * @crossplatform
4181   * @atomicservice
4182   * @since arkts {'1.1':'12','1.2':'20'}
4183   * @arkts 1.1&1.2
4184   */
4185  selectedBackgroundColor(value: ResourceColor): RichEditorAttribute;
4186
4187  /**
4188   * Called when edit status is changed
4189   *
4190   * @param { Callback<boolean> } callback - when edit status is changed
4191   * @returns { RichEditorAttribute } returns The attribute of the rich editor.
4192   * @syscap SystemCapability.ArkUI.ArkUI.Full
4193   * @crossplatform
4194   * @atomicservice
4195   * @since arkts {'1.1':'12','1.2':'20'}
4196   * @arkts 1.1&1.2
4197   */
4198  onEditingChange(callback: Callback<boolean>): RichEditorAttribute;
4199
4200  /**
4201   * Set enter key type of soft keyboard.
4202   *
4203   * @param { EnterKeyType } value - the enter key type of soft keyboard
4204   * @returns { RichEditorAttribute }
4205   * @syscap SystemCapability.ArkUI.ArkUI.Full
4206   * @crossplatform
4207   * @atomicservice
4208   * @since arkts {'1.1':'12','1.2':'20'}
4209   * @arkts 1.1&1.2
4210   */
4211  enterKeyType(value: EnterKeyType): RichEditorAttribute;
4212
4213  /**
4214   * Called when submitted.
4215   *
4216   * @param { SubmitCallback } callback - callback of the listened event.
4217   * @returns { RichEditorAttribute }
4218   * @syscap SystemCapability.ArkUI.ArkUI.Full
4219   * @crossplatform
4220   * @atomicservice
4221   * @since arkts {'1.1':'12','1.2':'20'}
4222   * @arkts 1.1&1.2
4223   */
4224  onSubmit(callback: SubmitCallback): RichEditorAttribute;
4225
4226  /**
4227   * Called before text changed.
4228   *
4229   * @param { Callback<RichEditorChangeValue, boolean> } callback - The triggered function before text content is about to change.
4230   * @returns { RichEditorAttribute }
4231   * @syscap SystemCapability.ArkUI.ArkUI.Full
4232   * @crossplatform
4233   * @atomicservice
4234   * @since arkts {'1.1':'12','1.2':'20'}
4235   * @arkts 1.1&1.2
4236   */
4237  onWillChange(callback: Callback<RichEditorChangeValue, boolean>) : RichEditorAttribute;
4238
4239  /**
4240   * Called after text changed.
4241   *
4242   * @param { OnDidChangeCallback } callback - The triggered function after content changed.
4243   * @returns { RichEditorAttribute }
4244   * @syscap SystemCapability.ArkUI.ArkUI.Full
4245   * @crossplatform
4246   * @atomicservice
4247   * @since arkts {'1.1':'12','1.2':'20'}
4248   * @arkts 1.1&1.2
4249   */
4250  onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute;
4251
4252  /**
4253    * Called before the cut event.
4254    *
4255    * @param { Callback<CutEvent> } callback - Called before the cut event.
4256    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4257    * @syscap SystemCapability.ArkUI.ArkUI.Full
4258    * @crossplatform
4259    * @atomicservice
4260   * @since arkts {'1.1':'12','1.2':'20'}
4261   * @arkts 1.1&1.2
4262    */
4263  onCut(callback: Callback<CutEvent>): RichEditorAttribute;
4264
4265  /**
4266    * Called before the copy event.
4267    *
4268    * @param { Callback<CopyEvent> } callback - Called before the copy event.
4269    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4270    * @syscap SystemCapability.ArkUI.ArkUI.Full
4271    * @crossplatform
4272    * @atomicservice
4273   * @since arkts {'1.1':'12','1.2':'20'}
4274   * @arkts 1.1&1.2
4275    */
4276  onCopy(callback: Callback<CopyEvent>): RichEditorAttribute;
4277
4278  /**
4279   * Set the custom text menu.
4280   *
4281   * @param { EditMenuOptions } editMenu - Customize text menu options.
4282   * @returns { RichEditorAttribute }
4283   * @syscap SystemCapability.ArkUI.ArkUI.Full
4284   * @crossplatform
4285   * @atomicservice
4286   * @since arkts {'1.1':'12','1.2':'20'}
4287   * @arkts 1.1&1.2
4288   */
4289  editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute;
4290
4291  /**
4292   * Sets whether request keyboard or not when on focus.
4293   *
4294   * @param { boolean } isEnabled - Whether enable request keyboard when on focus.
4295   * @returns { RichEditorAttribute } Returns the instance of the RichEditorAttribute.
4296   * @syscap SystemCapability.ArkUI.ArkUI.Full
4297   * @crossplatform
4298   * @atomicservice
4299   * @since arkts {'1.1':'12','1.2':'20'}
4300   * @arkts 1.1&1.2
4301   */
4302  enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute;
4303
4304  /**
4305   * Enable or disable haptic feedback.
4306   *
4307   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
4308   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4309   * @syscap SystemCapability.ArkUI.ArkUI.Full
4310   * @crossplatform
4311   * @atomicservice
4312   * @since arkts {'1.1':'13','1.2':'20'}
4313   * @arkts 1.1&1.2
4314   */
4315  enableHapticFeedback(isEnabled: boolean): RichEditorAttribute;
4316
4317  /**
4318   * Define bar state of the RichEditor.
4319   *
4320   * @param { BarState } state - bar state.
4321   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4322   * @syscap SystemCapability.ArkUI.ArkUI.Full
4323   * @crossplatform
4324   * @atomicservice
4325   * @since arkts {'1.1':'13','1.2':'20'}
4326   * @arkts 1.1&1.2
4327   */
4328  barState(state: BarState): RichEditorAttribute;
4329
4330  /**
4331   * Define the max length content of the richEditor.
4332   *
4333   * @param { Optional<number> } maxLength - The maximun length content of the richEditor.
4334   * @returns { RichEditorAttribute }  returns the instance of the RichEditorAttribute.
4335   * @syscap SystemCapability.ArkUI.ArkUI.Full
4336   * @crossplatform
4337   * @atomicservice
4338   * @since arkts {'1.1':'18','1.2':'20'}
4339   * @arkts 1.1&1.2
4340   */
4341  maxLength(maxLength: Optional<number>): RichEditorAttribute;
4342
4343  /**
4344   * Define max lines of the richEditor.
4345   *
4346   * @param { Optional<number> } maxLines - The maximun Lines of the richEditor.
4347   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4348   * @syscap SystemCapability.ArkUI.ArkUI.Full
4349   * @crossplatform
4350   * @atomicservice
4351   * @since arkts {'1.1':'18','1.2':'20'}
4352   * @arkts 1.1&1.2
4353   */
4354  maxLines(maxLines: Optional<number>): RichEditorAttribute;
4355
4356  /**
4357   * Whether to enable automatic spacing between Chinese and Latin characters.
4358   *
4359   * @param { Optional<boolean> } enable - The default value is false, indicates the flag whether to enable automatic spacing.
4360   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4361   * @syscap SystemCapability.ArkUI.ArkUI.Full
4362   * @crossplatform
4363   * @atomicservice
4364   * @since 20
4365   */
4366  enableAutoSpacing(enable: Optional<boolean>): RichEditorAttribute;
4367
4368  /**
4369   * Set the keyboard appearance.
4370   *
4371   * @param { Optional<KeyboardAppearance> } appearance - Default value is KeyboardAppearance.NONE_IMMERSIVE
4372   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4373   * @syscap SystemCapability.ArkUI.ArkUI.Full
4374   * @atomicservice
4375   * @since arkts {'1.1':'15','1.2':'20'}
4376   * @arkts 1.1&1.2
4377   */
4378  keyboardAppearance(appearance: Optional<KeyboardAppearance>): RichEditorAttribute;
4379
4380  /**
4381   * Set whether stop backPressed callback event or not.
4382   *
4383   * @param { Optional<boolean> } isStopped - Default value is true, set false to trigger the latest callback event.
4384   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4385   * @syscap SystemCapability.ArkUI.ArkUI.Full
4386   * @atomicservice
4387   * @since arkts {'1.1':'18','1.2':'20'}
4388   * @arkts 1.1&1.2
4389   */
4390  stopBackPress(isStopped: Optional<boolean>): RichEditorAttribute;
4391
4392  /**
4393   * Set undo style.
4394   *
4395   * @param { Optional<UndoStyle> } style - Default value is UndoStyle.CLEAR_STYLE.
4396   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
4397   * @syscap SystemCapability.ArkUI.ArkUI.Full
4398   * @crossplatform
4399   * @atomicservice
4400   * @since 20
4401   */
4402  undoStyle(style: Optional<UndoStyle>): RichEditorAttribute;
4403}
4404
4405/**
4406 * the callback of cut event.
4407 * @interface CutEvent
4408 * @syscap SystemCapability.ArkUI.ArkUI.Full
4409 * @crossplatform
4410 * @atomicservice
4411 * @since arkts {'1.1':'12','1.2':'20'}
4412 * @arkts 1.1&1.2
4413 */
4414declare interface CutEvent {
4415  /**
4416   * Prevent system cut event.
4417   *
4418   * @type { ?Callback<void> }
4419   * @syscap SystemCapability.ArkUI.ArkUI.Full
4420   * @crossplatform
4421   * @atomicservice
4422   * @since arkts {'1.1':'12','1.2':'20'}
4423   * @arkts 1.1&1.2
4424   */
4425  preventDefault?: Callback<void>;
4426}
4427
4428/**
4429 * the callback of copy event.
4430 * @interface CopyEvent
4431 * @syscap SystemCapability.ArkUI.ArkUI.Full
4432 * @crossplatform
4433 * @atomicservice
4434 * @since arkts {'1.1':'12','1.2':'20'}
4435 * @arkts 1.1&1.2
4436 */
4437declare interface CopyEvent {
4438  /**
4439   * Prevent system cut event.
4440   *
4441   * @type { ?Callback<void> }
4442   * @syscap SystemCapability.ArkUI.ArkUI.Full
4443   * @crossplatform
4444   * @atomicservice
4445   * @since arkts {'1.1':'12','1.2':'20'}
4446   * @arkts 1.1&1.2
4447   */
4448  preventDefault?: Callback<void>;
4449}
4450
4451/**
4452 * RichEditor url style.
4453 * @interface RichEditorUrlStyle
4454 * @syscap SystemCapability.ArkUI.ArkUI.Full
4455 * @crossplatform
4456 * @atomicservice
4457 * @since arkts {'1.1':'19','1.2':'20'}
4458 * @arkts 1.1&1.2
4459 */
4460declare interface RichEditorUrlStyle {
4461  /**
4462   * uniform resoure locator.
4463   *
4464   * @type { ?ResourceStr }
4465   * @syscap SystemCapability.ArkUI.ArkUI.Full
4466   * @crossplatform
4467   * @atomicservice
4468   * @since arkts {'1.1':'19','1.2':'20'}
4469   * @arkts 1.1&1.2
4470   */
4471  url?: ResourceStr;
4472}
4473
4474/**
4475 * callback of the listened enter key event.
4476 *
4477 * @typedef { function } SubmitCallback
4478 * @param { EnterKeyType } enterKey - the enter key type of soft keyboard.
4479 * @param { SubmitEvent } event - Provides the method of keeping RichEditor editable state when submitted.
4480 * @syscap SystemCapability.ArkUI.ArkUI.Full
4481 * @crossplatform
4482 * @atomicservice
4483 * @since arkts {'1.1':'12','1.2':'20'}
4484 * @arkts 1.1&1.2
4485 */
4486declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void;
4487
4488/**
4489 * Callback function when the selection menu appears.
4490 *
4491 * @typedef { function } MenuOnAppearCallback
4492 * @param { number } start - Start offset of the selected content in rich editor.
4493 * @param { number } end - End offset of the selected content in rich editor.
4494 * @syscap SystemCapability.ArkUI.ArkUI.Full
4495 * @crossplatform
4496 * @atomicservice
4497 * @since arkts {'1.1':'12','1.2':'20'}
4498 * @arkts 1.1&1.2
4499 */
4500declare type MenuOnAppearCallback = (start: number, end: number) => void;
4501
4502/**
4503 * Callback function when the selection menu show or hide.
4504 *
4505 * @typedef { function } MenuCallback
4506 * @param { number } start - Start offset of the selected content in rich editor.
4507 * @param { number } end - End offset of the selected content in rich editor.
4508 * @syscap SystemCapability.ArkUI.ArkUI.Full
4509 * @crossplatform
4510 * @atomicservice
4511 * @since arkts {'1.1':'15','1.2':'20'}
4512 * @arkts 1.1&1.2
4513 */
4514declare type MenuCallback = (start: number, end: number) => void;
4515
4516/**
4517 * Callback function when a paste operation is performed.
4518 *
4519 * @typedef { function } PasteEventCallback
4520 * @param { PasteEvent } [event] - The paste event.
4521 * @syscap SystemCapability.ArkUI.ArkUI.Full
4522 * @crossplatform
4523 * @atomicservice
4524 * @since arkts {'1.1':'12','1.2':'20'}
4525 * @arkts 1.1&1.2
4526 */
4527declare type PasteEventCallback = (event?: PasteEvent) => void;
4528
4529/**
4530 * callback of the on hover event.
4531 *
4532 * @typedef { function } OnHoverCallback
4533 * @param { boolean } status - The hover status
4534 * @param { HoverEvent } event - The event info for hover.
4535 * @syscap SystemCapability.ArkUI.ArkUI.Full
4536 * @crossplatform
4537 * @atomicservice
4538 * @since arkts {'1.1':'14','1.2':'20'}
4539 * @arkts 1.1&1.2
4540 */
4541declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void;
4542
4543/**
4544 * Provides an interface for writing texts.
4545 *
4546 * @interface RichEditorInterface
4547 * @syscap SystemCapability.ArkUI.ArkUI.Full
4548 * @since 10
4549 */
4550/**
4551 * Provides an interface for writing texts.
4552 *
4553 * @interface RichEditorInterface
4554 * @syscap SystemCapability.ArkUI.ArkUI.Full
4555 * @crossplatform
4556 * @atomicservice
4557 * @since arkts {'1.1':'11','1.2':'20'}
4558 * @arkts 1.1&1.2
4559 */
4560interface RichEditorInterface {
4561  /**
4562   * Called when create RichEditor.
4563   *
4564   * @param { RichEditorOptions } value
4565   * @returns { RichEditorAttribute }
4566   * @syscap SystemCapability.ArkUI.ArkUI.Full
4567   * @since 10
4568   */
4569  /**
4570   * Called when create RichEditor.
4571   *
4572   * @param { RichEditorOptions } value
4573   * @returns { RichEditorAttribute }
4574   * @syscap SystemCapability.ArkUI.ArkUI.Full
4575   * @crossplatform
4576   * @atomicservice
4577   * @since arkts {'1.1':'11','1.2':'20'}
4578   * @arkts 1.1&1.2
4579   */
4580  (value: RichEditorOptions): RichEditorAttribute;
4581
4582  /**
4583   * Called when create RichEditor with StyledString.
4584   *
4585   * @param { RichEditorStyledStringOptions} options
4586   * @returns { RichEditorAttribute }
4587   * @syscap SystemCapability.ArkUI.ArkUI.Full
4588   * @crossplatform
4589   * @atomicservice
4590   * @since arkts {'1.1':'12','1.2':'20'}
4591   * @arkts 1.1&1.2
4592   */
4593  (options: RichEditorStyledStringOptions): RichEditorAttribute;
4594}
4595
4596/**
4597 * Defines RichEditor Component instance.
4598 *
4599 * @syscap SystemCapability.ArkUI.ArkUI.Full
4600 * @since 10
4601 */
4602/**
4603 * Defines RichEditor Component instance.
4604 *
4605 * @syscap SystemCapability.ArkUI.ArkUI.Full
4606 * @crossplatform
4607 * @atomicservice
4608 * @since 11
4609 */
4610declare const RichEditorInstance: RichEditorAttribute;
4611
4612/**
4613 * Defines RichEditor Component.
4614 *
4615 * @syscap SystemCapability.ArkUI.ArkUI.Full
4616 * @since 10
4617 */
4618/**
4619 * Defines RichEditor Component.
4620 *
4621 * @syscap SystemCapability.ArkUI.ArkUI.Full
4622 * @crossplatform
4623 * @atomicservice
4624 * @since 11
4625 */
4626declare const RichEditor: RichEditorInterface;
4627