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