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