• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Defines delete text direction.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 10
27 */
28/**
29 * Defines delete text direction.
30 *
31 * @enum { number }
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @crossplatform
34 * @atomicservice
35 * @since 11
36 */
37declare enum RichEditorDeleteDirection {
38  /**
39   * Delete backward.
40   *
41   * @syscap SystemCapability.ArkUI.ArkUI.Full
42   * @since 10
43   */
44  /**
45   * Delete backward.
46   *
47   * @syscap SystemCapability.ArkUI.ArkUI.Full
48   * @crossplatform
49   * @atomicservice
50   * @since 11
51   */
52  BACKWARD,
53
54  /**
55   * Delete forward.
56   *
57   * @syscap SystemCapability.ArkUI.ArkUI.Full
58   * @since 10
59   */
60  /**
61   * Delete forward.
62   *
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @crossplatform
65   * @atomicservice
66   * @since 11
67   */
68  FORWARD,
69}
70
71/**
72 * Defines span type.
73 *
74 * @enum { number }
75 * @syscap SystemCapability.ArkUI.ArkUI.Full
76 * @since 10
77 */
78/**
79 * Defines span type.
80 *
81 * @enum { number }
82 * @syscap SystemCapability.ArkUI.ArkUI.Full
83 * @crossplatform
84 * @atomicservice
85 * @since 11
86 */
87declare enum RichEditorSpanType {
88  /**
89   * Text,corresponding textSpan type.
90   *
91   * @syscap SystemCapability.ArkUI.ArkUI.Full
92   * @since 10
93   */
94  /**
95   * Text,corresponding textSpan type.
96   *
97   * @syscap SystemCapability.ArkUI.ArkUI.Full
98   * @crossplatform
99   * @atomicservice
100   * @since 11
101   */
102  TEXT = 0,
103
104  /**
105   * Image,corresponding imageSpan type.
106   *
107   * @syscap SystemCapability.ArkUI.ArkUI.Full
108   * @since 10
109   */
110  /**
111   * Image,corresponding imageSpan type.
112   *
113   * @syscap SystemCapability.ArkUI.ArkUI.Full
114   * @crossplatform
115   * @atomicservice
116   * @since 11
117   */
118  IMAGE = 1,
119
120  /**
121   * Mixed,corresponding mixed span type.
122   *
123   * @syscap SystemCapability.ArkUI.ArkUI.Full
124   * @since 10
125   */
126  /**
127   * Mixed,corresponding mixed span type.
128   *
129   * @syscap SystemCapability.ArkUI.ArkUI.Full
130   * @crossplatform
131   * @atomicservice
132   * @since 11
133   */
134  MIXED = 2,
135
136  /**
137   * Builder,corresponding builderSpan type.
138   *
139   * @syscap SystemCapability.ArkUI.ArkUI.Full
140   * @crossplatform
141   * @atomicservice
142   * @since 12
143   */
144  BUILDER = 3,
145}
146
147/**
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 * Defines the custom keyboard options of RichEditor.
1941 *
1942 * @interface KeyboardOptions
1943 * @syscap SystemCapability.ArkUI.ArkUI.Full
1944 * @crossplatform
1945 * @atomicservice
1946 * @since 12
1947 */
1948 declare interface KeyboardOptions {
1949  /**
1950   * Indicates whether to support custom keyboard avoidance.
1951   *
1952   * @type { ?boolean }
1953   * @syscap SystemCapability.ArkUI.ArkUI.Full
1954   * @crossplatform
1955   * @atomicservice
1956   * @since 12
1957   */
1958  supportAvoidance?: boolean;
1959}
1960
1961/**
1962 * Defines the image span options of RichEditor.
1963 *
1964 * @interface RichEditorImageSpanOptions
1965 * @syscap SystemCapability.ArkUI.ArkUI.Full
1966 * @since 10
1967 */
1968/**
1969 * Defines the image span options of RichEditor.
1970 *
1971 * @interface RichEditorImageSpanOptions
1972 * @syscap SystemCapability.ArkUI.ArkUI.Full
1973 * @crossplatform
1974 * @atomicservice
1975 * @since 11
1976 */
1977declare interface RichEditorImageSpanOptions {
1978  /**
1979   * the offset that add image span at.
1980   *
1981   * @type { ?number }
1982   * @syscap SystemCapability.ArkUI.ArkUI.Full
1983   * @since 10
1984   */
1985  /**
1986   * the offset that add image span at.
1987   *
1988   * @type { ?number }
1989   * @syscap SystemCapability.ArkUI.ArkUI.Full
1990   * @crossplatform
1991   * @atomicservice
1992   * @since 11
1993   */
1994  offset?: number;
1995
1996  /**
1997   * image style.
1998   *
1999   * @type { ?RichEditorImageSpanStyle }
2000   * @syscap SystemCapability.ArkUI.ArkUI.Full
2001   * @since 10
2002   */
2003  /**
2004   * image style.
2005   *
2006   * @type { ?RichEditorImageSpanStyle }
2007   * @syscap SystemCapability.ArkUI.ArkUI.Full
2008   * @crossplatform
2009   * @atomicservice
2010   * @since 11
2011   */
2012  imageStyle?: RichEditorImageSpanStyle;
2013
2014  /**
2015   * RichEditor gesture.
2016   *
2017   * @type { ?RichEditorGesture }
2018   * @syscap SystemCapability.ArkUI.ArkUI.Full
2019   * @crossplatform
2020   * @since 11
2021   */
2022  /**
2023   * RichEditor gesture.
2024   *
2025   * @type { ?RichEditorGesture }
2026   * @syscap SystemCapability.ArkUI.ArkUI.Full
2027   * @crossplatform
2028   * @atomicservice
2029   * @since 12
2030   */
2031  gesture?: RichEditorGesture;
2032}
2033
2034/**
2035 * Defines the builder span options of RichEditor.
2036 *
2037 * @interface RichEditorBuilderSpanOptions
2038 * @syscap SystemCapability.ArkUI.ArkUI.Full
2039 * @crossplatform
2040 * @since 11
2041 */
2042/**
2043 * Defines the builder span options of RichEditor.
2044 *
2045 * @interface RichEditorBuilderSpanOptions
2046 * @syscap SystemCapability.ArkUI.ArkUI.Full
2047 * @crossplatform
2048 * @atomicservice
2049 * @since 12
2050 */
2051declare interface RichEditorBuilderSpanOptions {
2052  /**
2053   * The offset that add custom builder span at.
2054   *
2055   * @type { ?number } Indicates the index where the builder will be inserted
2056   * @syscap SystemCapability.ArkUI.ArkUI.Full
2057   * @crossplatform
2058   * @since 11
2059   */
2060  /**
2061   * The offset that add custom builder span at.
2062   *
2063   * @type { ?number } Indicates the index where the builder will be inserted
2064   * @syscap SystemCapability.ArkUI.ArkUI.Full
2065   * @crossplatform
2066   * @atomicservice
2067   * @since 12
2068   */
2069  offset?: number;
2070}
2071
2072/**
2073 * Defines the placeholder style.
2074 *
2075 * @interface PlaceholderStyle
2076 * @syscap SystemCapability.ArkUI.ArkUI.Full
2077 * @crossplatform
2078 * @atomicservice
2079 * @since 12
2080 */
2081declare interface PlaceholderStyle {
2082  /**
2083   * font.
2084   *
2085   * @type { ?Font }
2086   * @syscap SystemCapability.ArkUI.ArkUI.Full
2087   * @crossplatform
2088   * @atomicservice
2089   * @since 12
2090   */
2091  font?: Font;
2092
2093  /**
2094   * fontColor.
2095   *
2096   * @type { ?ResourceColor }
2097   * @syscap SystemCapability.ArkUI.ArkUI.Full
2098   * @crossplatform
2099   * @atomicservice
2100   * @since 12
2101   */
2102  fontColor?: ResourceColor;
2103}
2104
2105/**
2106 * Defines span style option of RichEditor.
2107 *
2108 * @interface RichEditorSpanStyleOptions
2109 * @syscap SystemCapability.ArkUI.ArkUI.Full
2110 * @since 10
2111 */
2112/**
2113 * Defines span style option of RichEditor.
2114 *
2115 * @interface RichEditorSpanStyleOptions
2116 * @syscap SystemCapability.ArkUI.ArkUI.Full
2117 * @crossplatform
2118 * @atomicservice
2119 * @since 11
2120 */
2121declare interface RichEditorSpanStyleOptions extends RichEditorRange { }
2122
2123/**
2124 * Defines paragraph style option of RichEditor.
2125 *
2126 * @interface RichEditorParagraphStyleOptions
2127 * @syscap SystemCapability.ArkUI.ArkUI.Full
2128 * @crossplatform
2129 * @since 11
2130 */
2131/**
2132 * Defines paragraph style option of RichEditor.
2133 *
2134 * @interface RichEditorParagraphStyleOptions
2135 * @syscap SystemCapability.ArkUI.ArkUI.Full
2136 * @crossplatform
2137 * @atomicservice
2138 * @since 12
2139 */
2140declare interface RichEditorParagraphStyleOptions extends RichEditorRange {
2141  /**
2142   * Paragraph style.
2143   *
2144   * @type { RichEditorParagraphStyle }
2145   * @syscap SystemCapability.ArkUI.ArkUI.Full
2146   * @crossplatform
2147   * @since 11
2148   */
2149  /**
2150   * Paragraph style.
2151   *
2152   * @type { RichEditorParagraphStyle }
2153   * @syscap SystemCapability.ArkUI.ArkUI.Full
2154   * @crossplatform
2155   * @atomicservice
2156   * @since 12
2157   */
2158  style: RichEditorParagraphStyle;
2159}
2160
2161/**
2162 * Defines text span style option of RichEditor.
2163 *
2164 * @interface RichEditorUpdateTextSpanStyleOptions
2165 * @syscap SystemCapability.ArkUI.ArkUI.Full
2166 * @since 10
2167 */
2168/**
2169 * Defines text span style option of RichEditor.
2170 *
2171 * @interface RichEditorUpdateTextSpanStyleOptions
2172 * @syscap SystemCapability.ArkUI.ArkUI.Full
2173 * @crossplatform
2174 * @atomicservice
2175 * @since 11
2176 */
2177declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions {
2178  /**
2179   * text style.
2180   *
2181   * @type { RichEditorTextStyle }
2182   * @syscap SystemCapability.ArkUI.ArkUI.Full
2183   * @since 10
2184   */
2185  /**
2186   * text style.
2187   *
2188   * @type { RichEditorTextStyle }
2189   * @syscap SystemCapability.ArkUI.ArkUI.Full
2190   * @crossplatform
2191   * @atomicservice
2192   * @since 11
2193   */
2194  textStyle: RichEditorTextStyle;
2195}
2196
2197/**
2198 * Defines image span style option of RichEditor.
2199 *
2200 * @interface RichEditorUpdateImageSpanStyleOptions
2201 * @syscap SystemCapability.ArkUI.ArkUI.Full
2202 * @since 10
2203 */
2204/**
2205 * Defines image span style option of RichEditor.
2206 *
2207 * @interface RichEditorUpdateImageSpanStyleOptions
2208 * @syscap SystemCapability.ArkUI.ArkUI.Full
2209 * @crossplatform
2210 * @atomicservice
2211 * @since 11
2212 */
2213declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions {
2214  /**
2215   * image style.
2216   *
2217   * @type { RichEditorImageSpanStyle }
2218   * @syscap SystemCapability.ArkUI.ArkUI.Full
2219   * @since 10
2220   */
2221  /**
2222   * image style.
2223   *
2224   * @type { RichEditorImageSpanStyle }
2225   * @syscap SystemCapability.ArkUI.ArkUI.Full
2226   * @crossplatform
2227   * @atomicservice
2228   * @since 11
2229   */
2230  imageStyle: RichEditorImageSpanStyle;
2231}
2232
2233/**
2234 * Defines symbol span style option of RichEditor.
2235 *
2236 * @interface RichEditorUpdateSymbolSpanStyleOptions
2237 * @syscap SystemCapability.ArkUI.ArkUI.Full
2238 * @crossplatform
2239 * @since 11
2240 */
2241/**
2242 * Defines symbol span style option of RichEditor.
2243 *
2244 * @interface RichEditorUpdateSymbolSpanStyleOptions
2245 * @syscap SystemCapability.ArkUI.ArkUI.Full
2246 * @crossplatform
2247 * @atomicservice
2248 * @since 12
2249 */
2250declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions {
2251  /**
2252   * Update the symbol span style.
2253   *
2254   * @type { RichEditorSymbolSpanStyle }
2255   * @syscap SystemCapability.ArkUI.ArkUI.Full
2256   * @crossplatform
2257   * @since 11
2258   */
2259  /**
2260   * Update the symbol span style.
2261   *
2262   * @type { RichEditorSymbolSpanStyle }
2263   * @syscap SystemCapability.ArkUI.ArkUI.Full
2264   * @crossplatform
2265   * @atomicservice
2266   * @since 12
2267   */
2268  symbolStyle: RichEditorSymbolSpanStyle;
2269}
2270
2271/**
2272 * Defines the symbol span options of RichEditor.
2273 *
2274 * @interface RichEditorSymbolSpanOptions
2275 * @syscap SystemCapability.ArkUI.ArkUI.Full
2276 * @crossplatform
2277 * @since 11
2278 */
2279/**
2280 * Defines the symbol span options of RichEditor.
2281 *
2282 * @interface RichEditorSymbolSpanOptions
2283 * @syscap SystemCapability.ArkUI.ArkUI.Full
2284 * @crossplatform
2285 * @atomicservice
2286 * @since 12
2287 */
2288declare interface RichEditorSymbolSpanOptions {
2289  /**
2290   * The offset that add custom symbol span at.
2291   *
2292   * @type { ?number }
2293   * @syscap SystemCapability.ArkUI.ArkUI.Full
2294   * @crossplatform
2295   * @since 11
2296   */
2297  /**
2298   * The offset that add custom symbol span at.
2299   *
2300   * @type { ?number }
2301   * @syscap SystemCapability.ArkUI.ArkUI.Full
2302   * @crossplatform
2303   * @atomicservice
2304   * @since 12
2305   */
2306  offset?: number;
2307
2308  /**
2309   * The style that add custom symbol span at.
2310   *
2311   * @type { ?RichEditorSymbolSpanStyle }
2312   * @syscap SystemCapability.ArkUI.ArkUI.Full
2313   * @crossplatform
2314   * @since 11
2315   */
2316  /**
2317   * The style that add custom symbol span at.
2318   *
2319   * @type { ?RichEditorSymbolSpanStyle }
2320   * @syscap SystemCapability.ArkUI.ArkUI.Full
2321   * @crossplatform
2322   * @atomicservice
2323   * @since 12
2324   */
2325  style?: RichEditorSymbolSpanStyle;
2326}
2327
2328/**
2329 * Defines the text information for editing.
2330 *
2331 * @interface RichEditorSelection
2332 * @syscap SystemCapability.ArkUI.ArkUI.Full
2333 * @since 10
2334 */
2335/**
2336 * Defines the text information for editing.
2337 *
2338 * @interface RichEditorSelection
2339 * @syscap SystemCapability.ArkUI.ArkUI.Full
2340 * @crossplatform
2341 * @atomicservice
2342 * @since 11
2343 */
2344declare interface RichEditorSelection {
2345  /**
2346   * The location info.
2347   *
2348   * @type { [number, number] }
2349   * @syscap SystemCapability.ArkUI.ArkUI.Full
2350   * @since 10
2351   */
2352  /**
2353   * The location info.
2354   *
2355   * @type { [number, number] }
2356   * @syscap SystemCapability.ArkUI.ArkUI.Full
2357   * @crossplatform
2358   * @atomicservice
2359   * @since 11
2360   */
2361  selection: [number, number];
2362
2363  /**
2364   * The selected text content.
2365   *
2366   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2367   * @syscap SystemCapability.ArkUI.ArkUI.Full
2368   * @since 10
2369   */
2370  /**
2371   * The selected text content.
2372   *
2373   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2374   * @syscap SystemCapability.ArkUI.ArkUI.Full
2375   * @crossplatform
2376   * @atomicservice
2377   * @since 11
2378   */
2379  spans: Array<RichEditorTextSpanResult | RichEditorImageSpanResult>;
2380}
2381
2382/**
2383 * Defines the inserted text value info.
2384 *
2385 * @interface RichEditorInsertValue
2386 * @syscap SystemCapability.ArkUI.ArkUI.Full
2387 * @since 10
2388 */
2389/**
2390 * Defines the inserted text value info.
2391 *
2392 * @interface RichEditorInsertValue
2393 * @syscap SystemCapability.ArkUI.ArkUI.Full
2394 * @crossplatform
2395 * @atomicservice
2396 * @since 11
2397 */
2398declare interface RichEditorInsertValue {
2399  /**
2400   * The location info where the value will be inserted.
2401   *
2402   * @type { number }
2403   * @syscap SystemCapability.ArkUI.ArkUI.Full
2404   * @since 10
2405   */
2406  /**
2407   * The location info where the value will be inserted.
2408   *
2409   * @type { number }
2410   * @syscap SystemCapability.ArkUI.ArkUI.Full
2411   * @crossplatform
2412   * @atomicservice
2413   * @since 11
2414   */
2415  insertOffset: number;
2416
2417  /**
2418   * The inserted value.
2419   *
2420   * @type { string }
2421   * @syscap SystemCapability.ArkUI.ArkUI.Full
2422   * @since 10
2423   */
2424  /**
2425   * The inserted value.
2426   *
2427   * @type { string }
2428   * @syscap SystemCapability.ArkUI.ArkUI.Full
2429   * @crossplatform
2430   * @atomicservice
2431   * @since 11
2432   */
2433  insertValue: string;
2434
2435  /**
2436   * The preview text.
2437   *
2438   * @type { ?string }
2439   * @syscap SystemCapability.ArkUI.ArkUI.Full
2440   * @crossplatform
2441   * @atomicservice
2442   * @since 12
2443   */
2444  previewText?: string;
2445}
2446
2447/**
2448 * Provides an interface for deleting value from text.
2449 *
2450 * @interface RichEditorDeleteValue
2451 * @syscap SystemCapability.ArkUI.ArkUI.Full
2452 * @since 10
2453 */
2454/**
2455 * Provides an interface for deleting value from text.
2456 *
2457 * @interface RichEditorDeleteValue
2458 * @syscap SystemCapability.ArkUI.ArkUI.Full
2459 * @crossplatform
2460 * @atomicservice
2461 * @since 11
2462 */
2463declare interface RichEditorDeleteValue {
2464  /**
2465   * The offset of deleting.
2466   *
2467   * @type { number }
2468   * @syscap SystemCapability.ArkUI.ArkUI.Full
2469   * @since 10
2470   */
2471  /**
2472   * The offset of deleting.
2473   *
2474   * @type { number }
2475   * @syscap SystemCapability.ArkUI.ArkUI.Full
2476   * @crossplatform
2477   * @atomicservice
2478   * @since 11
2479   */
2480  offset: number;
2481
2482  /**
2483   * The deleted direction.
2484   *
2485   * @type { RichEditorDeleteDirection }
2486   * @syscap SystemCapability.ArkUI.ArkUI.Full
2487   * @since 10
2488   */
2489  /**
2490   * The deleted direction.
2491   *
2492   * @type { RichEditorDeleteDirection }
2493   * @syscap SystemCapability.ArkUI.ArkUI.Full
2494   * @crossplatform
2495   * @atomicservice
2496   * @since 11
2497   */
2498  direction: RichEditorDeleteDirection;
2499
2500  /**
2501   * The deleted text length.
2502   *
2503   * @type { number }
2504   * @syscap SystemCapability.ArkUI.ArkUI.Full
2505   * @since 10
2506   */
2507  /**
2508   * The deleted text length.
2509   *
2510   * @type { number }
2511   * @syscap SystemCapability.ArkUI.ArkUI.Full
2512   * @crossplatform
2513   * @atomicservice
2514   * @since 11
2515   */
2516  length: number;
2517
2518  /**
2519   * The deleted span object.
2520   *
2521   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2522   * @syscap SystemCapability.ArkUI.ArkUI.Full
2523   * @since 10
2524   */
2525  /**
2526   * The deleted span object.
2527   *
2528   * @type { Array<RichEditorTextSpanResult | RichEditorImageSpanResult> }
2529   * @syscap SystemCapability.ArkUI.ArkUI.Full
2530   * @crossplatform
2531   * @atomicservice
2532   * @since 11
2533   */
2534  richEditorDeleteSpans: Array<RichEditorTextSpanResult | RichEditorImageSpanResult>;
2535}
2536
2537/**
2538 * Provides an interface for changes in the text.
2539 *
2540 * @interface RichEditorChangeValue
2541 * @syscap SystemCapability.ArkUI.ArkUI.Full
2542 * @crossplatform
2543 * @atomicservice
2544 * @since 12
2545 */
2546declare interface RichEditorChangeValue {
2547  /**
2548   * Range of content that will be replaced.
2549   *
2550   * @type { TextRange }
2551   * @syscap SystemCapability.ArkUI.ArkUI.Full
2552   * @crossplatform
2553   * @atomicservice
2554   * @since 12
2555   */
2556  rangeBefore: TextRange;
2557
2558  /**
2559   * Text spans to replace.
2560   *
2561   * @type { Array<RichEditorTextSpanResult> }
2562   * @syscap SystemCapability.ArkUI.ArkUI.Full
2563   * @crossplatform
2564   * @atomicservice
2565   * @since 12
2566   */
2567  replacedSpans: Array<RichEditorTextSpanResult>;
2568
2569  /**
2570   * Image spans to replace.
2571   *
2572   * @type { Array<RichEditorImageSpanResult> }
2573   * @syscap SystemCapability.ArkUI.ArkUI.Full
2574   * @crossplatform
2575   * @atomicservice
2576   * @since 12
2577   */
2578  replacedImageSpans: Array<RichEditorImageSpanResult>;
2579
2580  /**
2581   * Symbol spans to replace.
2582   *
2583   * @type { Array<RichEditorTextSpanResult> }
2584   * @syscap SystemCapability.ArkUI.ArkUI.Full
2585   * @crossplatform
2586   * @atomicservice
2587   * @since 12
2588   */
2589  replacedSymbolSpans: Array<RichEditorTextSpanResult>;
2590}
2591
2592/**
2593 * Defines the options of RichEditor.
2594 *
2595 * @interface RichEditorOptions
2596 * @syscap SystemCapability.ArkUI.ArkUI.Full
2597 * @since 10
2598 */
2599/**
2600 * Defines the options of RichEditor.
2601 *
2602 * @interface RichEditorOptions
2603 * @syscap SystemCapability.ArkUI.ArkUI.Full
2604 * @crossplatform
2605 * @atomicservice
2606 * @since 11
2607 */
2608declare interface RichEditorOptions {
2609  /**
2610   * RichEditor controller.
2611   *
2612   * @type { RichEditorController }
2613   * @syscap SystemCapability.ArkUI.ArkUI.Full
2614   * @since 10
2615   */
2616  /**
2617   * RichEditor controller.
2618   *
2619   * @type { RichEditorController }
2620   * @syscap SystemCapability.ArkUI.ArkUI.Full
2621   * @crossplatform
2622   * @atomicservice
2623   * @since 11
2624   */
2625  controller: RichEditorController;
2626}
2627
2628/**
2629 * Defines the options of RichEditor with StyledString.
2630 *
2631 * @interface RichEditorStyledStringOptions
2632 * @syscap SystemCapability.ArkUI.ArkUI.Full
2633 * @crossplatform
2634 * @atomicservice
2635 * @since 12
2636 */
2637declare interface RichEditorStyledStringOptions {
2638  /**
2639   * RichEditor controller.
2640   *
2641   * @type { RichEditorStyledStringController }
2642   * @syscap SystemCapability.ArkUI.ArkUI.Full
2643   * @crossplatform
2644   * @atomicservice
2645   * @since 12
2646   */
2647  controller: RichEditorStyledStringController;
2648}
2649
2650/**
2651 * Defines the selection menu options.
2652 *
2653 * @interface SelectionMenuOptions
2654 * @syscap SystemCapability.ArkUI.ArkUI.Full
2655 * @crossplatform
2656 * @since 10
2657 */
2658/**
2659 * Defines the selection menu options.
2660 *
2661 * @interface SelectionMenuOptions
2662 * @syscap SystemCapability.ArkUI.ArkUI.Full
2663 * @crossplatform
2664 * @atomicservice
2665 * @since 11
2666 */
2667declare interface SelectionMenuOptions {
2668  /**
2669   * Callback function when the selection menu appears.
2670   *
2671   * @type { ?function }
2672   * @syscap SystemCapability.ArkUI.ArkUI.Full
2673   * @crossplatform
2674   * @since 10
2675   */
2676  /**
2677   * Callback function when the selection menu appears.
2678   *
2679   * @type { ?function }
2680   * @syscap SystemCapability.ArkUI.ArkUI.Full
2681   * @crossplatform
2682   * @atomicservice
2683   * @since 11
2684   */
2685  /**
2686   * Callback function when the selection menu appears.
2687   *
2688   * @type { ?MenuOnAppearCallback }
2689   * @syscap SystemCapability.ArkUI.ArkUI.Full
2690   * @crossplatform
2691   * @atomicservice
2692   * @since 12
2693   */
2694  onAppear?: MenuOnAppearCallback;
2695
2696  /**
2697   * Callback function when the selection menu disappears.
2698   *
2699   * @type { ?function }
2700   * @syscap SystemCapability.ArkUI.ArkUI.Full
2701   * @crossplatform
2702   * @since 10
2703   */
2704  /**
2705   * Callback function when the selection menu disappears.
2706   *
2707   * @type { ?function }
2708   * @syscap SystemCapability.ArkUI.ArkUI.Full
2709   * @crossplatform
2710   * @atomicservice
2711   * @since 11
2712   */
2713  /**
2714   * Callback function when the selection menu disappears.
2715   *
2716   * @type { ?Callback<void> }
2717   * @syscap SystemCapability.ArkUI.ArkUI.Full
2718   * @crossplatform
2719   * @atomicservice
2720   * @since 12
2721   */
2722  onDisappear?: Callback<void>;
2723
2724  /**
2725   * Menu type, default value is MenuType.SELECTION_MENU.
2726   *
2727   * @type { ?MenuType }
2728   * @syscap SystemCapability.ArkUI.ArkUI.Full
2729   * @crossplatform
2730   * @atomicservice
2731   * @since 13
2732   */
2733  menuType?: MenuType;
2734}
2735
2736/**
2737 * Provides Base Controller for RichEditor.
2738 *
2739 * @implements TextEditControllerEx
2740 * @syscap SystemCapability.ArkUI.ArkUI.Full
2741 * @crossplatform
2742 * @atomicservice
2743 * @since 12
2744 */
2745declare class RichEditorBaseController implements TextEditControllerEx {
2746  /**
2747   * Get caret offset from controller.
2748   *
2749   * @returns { number }
2750   * @syscap SystemCapability.ArkUI.ArkUI.Full
2751   * @since 10
2752   */
2753  /**
2754   * Get caret offset from controller.
2755   *
2756   * @returns { number }
2757   * @syscap SystemCapability.ArkUI.ArkUI.Full
2758   * @crossplatform
2759   * @atomicservice
2760   * @since 11
2761   */
2762  getCaretOffset(): number;
2763
2764  /**
2765   * Set caret offset.
2766   *
2767   * @param { number } offset - caret offset.
2768   * @returns { boolean }
2769   * @syscap SystemCapability.ArkUI.ArkUI.Full
2770   * @since 10
2771   */
2772  /**
2773   * Set caret offset.
2774   *
2775   * @param { number } offset - caret offset.
2776   * @returns { boolean }
2777   * @syscap SystemCapability.ArkUI.ArkUI.Full
2778   * @crossplatform
2779   * @atomicservice
2780   * @since 11
2781   */
2782  setCaretOffset(offset: number): boolean;
2783
2784  /**
2785   * close the select menu when menu is on.
2786   *
2787   * @syscap SystemCapability.ArkUI.ArkUI.Full
2788   * @since 10
2789   */
2790  /**
2791   * close the select menu when menu is on.
2792   *
2793   * @syscap SystemCapability.ArkUI.ArkUI.Full
2794   * @crossplatform
2795   * @atomicservice
2796   * @since 11
2797   */
2798  closeSelectionMenu(): void;
2799
2800  /**
2801   * Get the typing text style.
2802   *
2803   * @returns { RichEditorTextStyle }
2804   * @syscap SystemCapability.ArkUI.ArkUI.Full
2805   * @crossplatform
2806   * @since 11
2807   */
2808  /**
2809   * Get the typing text style.
2810   *
2811   * @returns { RichEditorTextStyle }
2812   * @syscap SystemCapability.ArkUI.ArkUI.Full
2813   * @crossplatform
2814   * @atomicservice
2815   * @since 12
2816   */
2817  getTypingStyle(): RichEditorTextStyle;
2818
2819  /**
2820   * Set the typing text style.
2821   *
2822   * @param { RichEditorTextStyle } value - set the typing text style.
2823   * @syscap SystemCapability.ArkUI.ArkUI.Full
2824   * @crossplatform
2825   * @since 11
2826   */
2827  /**
2828   * Set the typing text style.
2829   *
2830   * @param { RichEditorTextStyle } value - set the typing text style.
2831   * @syscap SystemCapability.ArkUI.ArkUI.Full
2832   * @crossplatform
2833   * @atomicservice
2834   * @since 12
2835   */
2836  setTypingStyle(value: RichEditorTextStyle): void;
2837
2838  /**
2839   * Text selection is achieved by specifying the start and end positions of the rich editor.
2840   *
2841   * @param { number } selectionStart - The start position of the selected text.
2842   * @param { number } selectionEnd - The end position of the selected text.
2843   * @syscap SystemCapability.ArkUI.ArkUI.Full
2844   * @crossplatform
2845   * @since 11
2846   */
2847  /**
2848   * Specify the start and end positions to select a range of content.
2849   *
2850   * @param { number } selectionStart - The start position of the selected text.
2851   * @param { number } selectionEnd - The end position of the selected text.
2852   * @param { SelectionOptions } [options] - Indicates the options of selection.
2853   * @syscap SystemCapability.ArkUI.ArkUI.Full
2854   * @crossplatform
2855   * @atomicservice
2856   * @since 12
2857   */
2858  setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void;
2859
2860  /**
2861   * Judge whether is in editing state
2862   *
2863   * @returns { boolean } - true is editing state, false is non editing status
2864   * @syscap SystemCapability.ArkUI.ArkUI.Full
2865   * @crossplatform
2866   * @atomicservice
2867   * @since 12
2868   */
2869  isEditing(): boolean;
2870
2871  /**
2872   * Stop editing state.
2873   *
2874   * @syscap SystemCapability.ArkUI.ArkUI.Full
2875   * @crossplatform
2876   * @atomicservice
2877   * @since 12
2878   */
2879  stopEditing(): void;
2880
2881  /**
2882   * Get LayoutManager.
2883   *
2884   * @returns { LayoutManager } - Return the LayoutManager.
2885   * @syscap SystemCapability.ArkUI.ArkUI.Full
2886   * @crossplatform
2887   * @atomicservice
2888   * @since 12
2889   */
2890  getLayoutManager(): LayoutManager;
2891
2892  /**
2893   * Get PreviewText.
2894   *
2895   * @returns { PreviewText } - Return the PreviewText.
2896   * @syscap SystemCapability.ArkUI.ArkUI.Full
2897   * @crossplatform
2898   * @atomicservice
2899   * @since 12
2900   */
2901  getPreviewText(): PreviewText;
2902}
2903
2904/**
2905 * Provides Controller for RichEditor.
2906 *
2907 * @syscap SystemCapability.ArkUI.ArkUI.Full
2908 * @since 10
2909 */
2910/**
2911 * Provides Controller for RichEditor.
2912 *
2913 * @syscap SystemCapability.ArkUI.ArkUI.Full
2914 * @crossplatform
2915 * @atomicservice
2916 * @since 11
2917 */
2918/**
2919 * Provides Controller for RichEditor.
2920 *
2921 * @extends RichEditorBaseController
2922 * @syscap SystemCapability.ArkUI.ArkUI.Full
2923 * @crossplatform
2924 * @atomicservice
2925 * @since 12
2926 */
2927declare class RichEditorController extends RichEditorBaseController {
2928  /**
2929   * Add a text span.
2930   *
2931   * @param { string } value - text value.
2932   * @param { RichEditorTextSpanOptions } [options] - span info.
2933   * @returns { number } span index
2934   * @syscap SystemCapability.ArkUI.ArkUI.Full
2935   * @since 10
2936   */
2937  /**
2938   * Add a text span.
2939   *
2940   * @param { string } value - text value.
2941   * @param { RichEditorTextSpanOptions } [options] - span info.
2942   * @returns { number } span index
2943   * @syscap SystemCapability.ArkUI.ArkUI.Full
2944   * @crossplatform
2945   * @atomicservice
2946   * @since 11
2947   */
2948  addTextSpan(value: string, options?: RichEditorTextSpanOptions): number;
2949
2950  /**
2951   * Add a image span.
2952   *
2953   * @param { PixelMap | ResourceStr } value - image value.
2954   * @param { RichEditorImageSpanOptions } [options] - image span info.
2955   * @returns { number } span index
2956   * @syscap SystemCapability.ArkUI.ArkUI.Full
2957   * @since 10
2958   */
2959  /**
2960   * Add a image span.
2961   *
2962   * @param { PixelMap | ResourceStr } value - image value.
2963   * @param { RichEditorImageSpanOptions } [options] - image span info.
2964   * @returns { number } span index
2965   * @syscap SystemCapability.ArkUI.ArkUI.Full
2966   * @crossplatform
2967   * @atomicservice
2968   * @since 11
2969   */
2970  addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number;
2971
2972  /**
2973   * Add a builder span.
2974   *
2975   * @param { CustomBuilder } value - Indicates the custom builder node
2976   * @param { RichEditorBuilderSpanOptions } [options] - span option.
2977   * @returns { number } span index
2978   * @syscap SystemCapability.ArkUI.ArkUI.Full
2979   * @crossplatform
2980   * @since 11
2981   */
2982  /**
2983   * Add a builder span.
2984   *
2985   * @param { CustomBuilder } value - Indicates the custom builder node
2986   * @param { RichEditorBuilderSpanOptions } [options] - span option.
2987   * @returns { number } span index
2988   * @syscap SystemCapability.ArkUI.ArkUI.Full
2989   * @crossplatform
2990   * @atomicservice
2991   * @since 12
2992   */
2993  addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number;
2994
2995  /**
2996   * Add a symbol span.
2997   *
2998   * @param { Resource } value - symbol span value
2999   * @param { RichEditorSymbolSpanOptions } [options] - symbol span option.
3000   * @returns { number } symbol span index
3001   * @syscap SystemCapability.ArkUI.ArkUI.Full
3002   * @crossplatform
3003   * @since 11
3004   */
3005  /**
3006   * Add a symbol span.
3007   *
3008   * @param { Resource } value - symbol span value
3009   * @param { RichEditorSymbolSpanOptions } [options] - symbol span option.
3010   * @returns { number } symbol span index
3011   * @syscap SystemCapability.ArkUI.ArkUI.Full
3012   * @crossplatform
3013   * @atomicservice
3014   * @since 12
3015   */
3016  addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number;
3017
3018  /**
3019   * Modify span style.
3020   *
3021   * @param { RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions } value
3022   * @syscap SystemCapability.ArkUI.ArkUI.Full
3023   * @since 10
3024   */
3025  /**
3026   * Modify span style.
3027   *
3028   * @param { RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions } value
3029   * @syscap SystemCapability.ArkUI.ArkUI.Full
3030   * @crossplatform
3031   * @atomicservice
3032   * @since 11
3033   */
3034  updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void;
3035
3036  /**
3037   * Modify span style.
3038   *
3039   * @param { RichEditorParagraphStyleOptions } value
3040   * @syscap SystemCapability.ArkUI.ArkUI.Full
3041   * @crossplatform
3042   * @since 11
3043   */
3044  /**
3045   * Modify span style.
3046   *
3047   * @param { RichEditorParagraphStyleOptions } value
3048   * @syscap SystemCapability.ArkUI.ArkUI.Full
3049   * @crossplatform
3050   * @atomicservice
3051   * @since 12
3052   */
3053  updateParagraphStyle(value: RichEditorParagraphStyleOptions): void;
3054
3055  /**
3056   * Delete span.
3057   *
3058   * @param { RichEditorRange } [value] - range for deleting.
3059   * @syscap SystemCapability.ArkUI.ArkUI.Full
3060   * @since 10
3061   */
3062  /**
3063   * Delete span.
3064   *
3065   * @param { RichEditorRange } [value] - range for deleting.
3066   * @syscap SystemCapability.ArkUI.ArkUI.Full
3067   * @crossplatform
3068   * @atomicservice
3069   * @since 11
3070   */
3071  deleteSpans(value?: RichEditorRange): void;
3072
3073  /**
3074   * Get span content.
3075   *
3076   * @param { RichEditorRange } [value] - range for getting span info.
3077   * @returns { Array<RichEditorImageSpanResult | RichEditorTextSpanResult> }
3078   * @syscap SystemCapability.ArkUI.ArkUI.Full
3079   * @since 10
3080   */
3081  /**
3082   * Get span content.
3083   *
3084   * @param { RichEditorRange } [value] - range for getting span info.
3085   * @returns { Array<RichEditorImageSpanResult | RichEditorTextSpanResult> }
3086   * @syscap SystemCapability.ArkUI.ArkUI.Full
3087   * @crossplatform
3088   * @atomicservice
3089   * @since 11
3090   */
3091  getSpans(value?: RichEditorRange): Array<RichEditorImageSpanResult | RichEditorTextSpanResult>;
3092
3093  /**
3094   * Get span content.
3095   *
3096   * @param { RichEditorRange } [value] - range for getting span info.
3097   * @returns { Array<RichEditorParagraphResult> }
3098   * @syscap SystemCapability.ArkUI.ArkUI.Full
3099   * @crossplatform
3100   * @since 11
3101   */
3102  /**
3103   * Get span content.
3104   *
3105   * @param { RichEditorRange } [value] - range for getting span info.
3106   * @returns { Array<RichEditorParagraphResult> }
3107   * @syscap SystemCapability.ArkUI.ArkUI.Full
3108   * @crossplatform
3109   * @atomicservice
3110   * @since 12
3111   */
3112  getParagraphs(value?: RichEditorRange): Array<RichEditorParagraphResult>;
3113
3114  /**
3115   * Called when the content is selected.
3116   *
3117   * @returns { RichEditorSelection }
3118   * @syscap SystemCapability.ArkUI.ArkUI.Full
3119   * @crossplatform
3120   * @since 11
3121   */
3122  /**
3123   * Called when the content is selected.
3124   *
3125   * @returns { RichEditorSelection }
3126   * @syscap SystemCapability.ArkUI.ArkUI.Full
3127   * @crossplatform
3128   * @atomicservice
3129   * @since 12
3130   */
3131  getSelection(): RichEditorSelection;
3132
3133  /**
3134   * Convert StyledString to spans in rich editor.
3135   * return a empty Array<RichEditorSpan> if convert failed
3136   *
3137   * @param { StyledString } value - StyledString.
3138   * @returns { Array<RichEditorSpan> }
3139   * @throws { BusinessError } 401 - The parameter check failed.
3140   * @syscap SystemCapability.ArkUI.ArkUI.Full
3141   * @crossplatform
3142   * @atomicservice
3143   * @since 12
3144   */
3145  fromStyledString(value: StyledString): Array<RichEditorSpan>;
3146
3147  /**
3148   * Convert spans to StyledString in rich editor.
3149   * return a empty StyledString if convert failed
3150   *
3151   * @param { RichEditorRange } value - range of spans in rich editor
3152   * @returns { StyledString }
3153   * @throws { BusinessError } 401 - The parameter check failed.
3154   * @syscap SystemCapability.ArkUI.ArkUI.Full
3155   * @crossplatform
3156   * @atomicservice
3157   * @since 12
3158   */
3159    toStyledString(value: RichEditorRange): StyledString;
3160}
3161
3162/**
3163 * Defines the types of spans in rich editor.
3164 *
3165 * @typedef { RichEditorImageSpanResult | RichEditorTextSpanResult } RichEditorSpan
3166 * @syscap SystemCapability.ArkUI.ArkUI.Full
3167 * @crossplatform
3168 * @atomicservice
3169 * @since 12
3170 */
3171declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult;
3172
3173/**
3174 * Provides Controller for RichEditor with StyledString.
3175 *
3176 * @extends RichEditorBaseController
3177 * @implements StyledStringController
3178 * @syscap SystemCapability.ArkUI.ArkUI.Full
3179 * @crossplatform
3180 * @atomicservice
3181 * @since 12
3182 */
3183declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController {
3184  /**
3185   * Set the StyledString of the RichEditor.
3186   *
3187   * @param { StyledString } styledString - StyledString.
3188   * @syscap SystemCapability.ArkUI.ArkUI.Full
3189   * @crossplatform
3190   * @atomicservice
3191   * @since 12
3192   */
3193  setStyledString(styledString: StyledString): void;
3194
3195  /**
3196   * Get the StyledString of the RichEditor.
3197   *
3198   * @returns { MutableStyledString }
3199   * @syscap SystemCapability.ArkUI.ArkUI.Full
3200   * @atomicservice
3201   * @since 12
3202   */
3203  getStyledString(): MutableStyledString;
3204
3205  /**
3206   * Get the selection in the StyledString of the RichEditor.
3207   *
3208   * @returns { RichEditorRange }
3209   * @syscap SystemCapability.ArkUI.ArkUI.Full
3210   * @crossplatform
3211   * @atomicservice
3212   * @since 12
3213   */
3214  getSelection(): RichEditorRange;
3215
3216  /**
3217   * Register content changed listener
3218   *
3219   * @param { StyledStringChangedListener } listener - content changed listener.
3220   * @syscap SystemCapability.ArkUI.ArkUI.Full
3221   * @crossplatform
3222   * @atomicservice
3223   * @since 12
3224   */
3225  onContentChanged(listener: StyledStringChangedListener): void;
3226}
3227
3228/**
3229 * Provides attribute for RichEditor.
3230 *
3231 * @extends CommonMethod<RichEditorAttribute>
3232 * @syscap SystemCapability.ArkUI.ArkUI.Full
3233 * @since 10
3234 */
3235/**
3236 * Provides attribute for RichEditor.
3237 *
3238 * @extends CommonMethod<RichEditorAttribute>
3239 * @syscap SystemCapability.ArkUI.ArkUI.Full
3240 * @crossplatform
3241 * @atomicservice
3242 * @since 11
3243 */
3244declare class RichEditorAttribute extends CommonMethod<RichEditorAttribute> {
3245  /**
3246   * Called when on ready.
3247   *
3248   * @param { function } callback - The triggered function when rich editor is ready.
3249   * @returns { RichEditorAttribute }
3250   * @syscap SystemCapability.ArkUI.ArkUI.Full
3251   * @since 10
3252   */
3253  /**
3254   * Called when on ready.
3255   *
3256   * @param { function } callback - The triggered function when rich editor is ready.
3257   * @returns { RichEditorAttribute }
3258   * @syscap SystemCapability.ArkUI.ArkUI.Full
3259   * @crossplatform
3260   * @atomicservice
3261   * @since 11
3262   */
3263  /**
3264   * Called when on ready.
3265   *
3266   * @param { Callback<void> } callback - The triggered function when rich editor is ready.
3267   * @returns { RichEditorAttribute }
3268   * @syscap SystemCapability.ArkUI.ArkUI.Full
3269   * @crossplatform
3270   * @atomicservice
3271   * @since 12
3272   */
3273  onReady(callback: Callback<void>): RichEditorAttribute;
3274
3275  /**
3276   * Called when the content is selected.
3277   *
3278   * @param { function } callback - The triggered function when select text.
3279   * @returns { RichEditorAttribute }
3280   * @syscap SystemCapability.ArkUI.ArkUI.Full
3281   * @since 10
3282   */
3283  /**
3284   * Called when the content is selected.
3285   *
3286   * @param { function } callback - The triggered function when select text.
3287   * @returns { RichEditorAttribute }
3288   * @syscap SystemCapability.ArkUI.ArkUI.Full
3289   * @crossplatform
3290   * @atomicservice
3291   * @since 11
3292   */
3293  /**
3294   * Called when the content is selected.
3295   *
3296   * @param { Callback<RichEditorSelection> } callback - The triggered function when select text.
3297   * @returns { RichEditorAttribute }
3298   * @syscap SystemCapability.ArkUI.ArkUI.Full
3299   * @crossplatform
3300   * @atomicservice
3301   * @since 12
3302   */
3303  onSelect(callback: Callback<RichEditorSelection>): RichEditorAttribute;
3304
3305  /**
3306   * Called when selection range or caret position is changed.
3307   *
3308   * @param { Callback<RichEditorRange> } callback - The triggered function when change selection range or caret position.
3309   * @returns { RichEditorAttribute }
3310   * @syscap SystemCapability.ArkUI.ArkUI.Full
3311   * @crossplatform
3312   * @atomicservice
3313   * @since 12
3314   */
3315  onSelectionChange(callback: Callback<RichEditorRange>): RichEditorAttribute;
3316
3317  /**
3318   * Get text value information when about to input.
3319   *
3320   * @param { function } callback - The triggered function when text content is about to insert.
3321   * @returns { RichEditorAttribute }
3322   * @syscap SystemCapability.ArkUI.ArkUI.Full
3323   * @since 10
3324   */
3325  /**
3326   * Get text value information when about to input.
3327   *
3328   * @param { function } callback - The triggered function when text content is about to insert.
3329   * @returns { RichEditorAttribute }
3330   * @syscap SystemCapability.ArkUI.ArkUI.Full
3331   * @crossplatform
3332   * @atomicservice
3333   * @since 11
3334   */
3335  /**
3336   * Get text value information when about to input.
3337   *
3338   * @param { Callback<RichEditorInsertValue, boolean> } callback - The triggered function when text content is about to insert.
3339   * @returns { RichEditorAttribute }
3340   * @syscap SystemCapability.ArkUI.ArkUI.Full
3341   * @crossplatform
3342   * @atomicservice
3343   * @since 12
3344   */
3345  aboutToIMEInput(callback: Callback<RichEditorInsertValue, boolean>): RichEditorAttribute;
3346
3347  /**
3348   * Get text value information when completed input.
3349   *
3350   * @param { function } callback - The triggered function when text content has been inserted.
3351   * @returns { RichEditorAttribute }
3352   * @syscap SystemCapability.ArkUI.ArkUI.Full
3353   * @since 10
3354   */
3355  /**
3356   * Get text value information when completed input.
3357   *
3358   * @param { function } callback - The triggered function when text content has been inserted.
3359   * @returns { RichEditorAttribute }
3360   * @syscap SystemCapability.ArkUI.ArkUI.Full
3361   * @crossplatform
3362   * @atomicservice
3363   * @since 11
3364   */
3365  /**
3366   * Get text value information when completed input.
3367   *
3368   * @param { Callback<RichEditorTextSpanResult> } callback - The triggered function when text content has been inserted.
3369   * @returns { RichEditorAttribute }
3370   * @syscap SystemCapability.ArkUI.ArkUI.Full
3371   * @crossplatform
3372   * @atomicservice
3373   * @since 12
3374   */
3375  onIMEInputComplete(callback: Callback<RichEditorTextSpanResult>): RichEditorAttribute;
3376
3377  /**
3378   * Called when ime input complete.
3379   *
3380   * @param { Callback<TextRange> } callback - The triggered function when text content has been inserted.
3381   * @returns { RichEditorAttribute }
3382   * @syscap SystemCapability.ArkUI.ArkUI.Full
3383   * @crossplatform
3384   * @atomicservice
3385   * @since 12
3386   */
3387  onDidIMEInput(callback: Callback<TextRange>): RichEditorAttribute;
3388
3389  /**
3390   * Get text value information when about to delete.
3391   *
3392   * @param { function } callback - The triggered function when text content is about to delete.
3393   * @returns { RichEditorAttribute }
3394   * @syscap SystemCapability.ArkUI.ArkUI.Full
3395   * @since 10
3396   */
3397  /**
3398   * Get text value information when about to delete.
3399   *
3400   * @param { function } callback - The triggered function when text content is about to delete.
3401   * @returns { RichEditorAttribute }
3402   * @syscap SystemCapability.ArkUI.ArkUI.Full
3403   * @crossplatform
3404   * @atomicservice
3405   * @since 11
3406   */
3407  /**
3408   * Get text value information when about to delete.
3409   *
3410   * @param { Callback<RichEditorDeleteValue, boolean> } callback - The triggered function when text content is about to delete.
3411   * @returns { RichEditorAttribute }
3412   * @syscap SystemCapability.ArkUI.ArkUI.Full
3413   * @crossplatform
3414   * @atomicservice
3415   * @since 12
3416   */
3417  aboutToDelete(callback: Callback<RichEditorDeleteValue, boolean>): RichEditorAttribute;
3418
3419  /**
3420   * Notify that the deletion has been completed
3421   *
3422   * @param { function } callback - The triggered function when text content has been deleted.
3423   * @returns { RichEditorAttribute }
3424   * @syscap SystemCapability.ArkUI.ArkUI.Full
3425   * @since 10
3426   */
3427  /**
3428   * Notify that the deletion has been completed
3429   *
3430   * @param { function } callback - The triggered function when text content has been deleted.
3431   * @returns { RichEditorAttribute }
3432   * @syscap SystemCapability.ArkUI.ArkUI.Full
3433   * @crossplatform
3434   * @atomicservice
3435   * @since 11
3436   */
3437  /**
3438   * Notify that the deletion has been completed
3439   *
3440   * @param { Callback<void> } callback - The triggered function when text content has been deleted.
3441   * @returns { RichEditorAttribute }
3442   * @syscap SystemCapability.ArkUI.ArkUI.Full
3443   * @crossplatform
3444   * @atomicservice
3445   * @since 12
3446   */
3447  onDeleteComplete(callback: Callback<void>): RichEditorAttribute;
3448
3449  /**
3450   * Allow replication.
3451   *
3452   * @param { CopyOptions } value - Indicates the type of copy option.
3453   * @returns { RichEditorAttribute }
3454   * @syscap SystemCapability.ArkUI.ArkUI.Full
3455   * @crossplatform
3456   * @form
3457   * @since 10
3458   */
3459  /**
3460   * Allow replication.
3461   *
3462   * @param { CopyOptions } value - Indicates the type of copy option.
3463   * @returns { RichEditorAttribute }
3464   * @syscap SystemCapability.ArkUI.ArkUI.Full
3465   * @crossplatform
3466   * @form
3467   * @atomicservice
3468   * @since 11
3469   */
3470  copyOptions(value: CopyOptions): RichEditorAttribute;
3471
3472  /**
3473   * Bind to the selection menu.
3474   *
3475   * @param { RichEditorSpanType } spanType - Indicates the type of selection menu.
3476   * @param { CustomBuilder } content - Indicates the content of selection menu.
3477   * @param { ResponseType } responseType - Indicates response type of selection menu.
3478   * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu.
3479   * @returns { RichEditorAttribute }
3480   * @syscap SystemCapability.ArkUI.ArkUI.Full
3481   * @crossplatform
3482   * @since 10
3483   */
3484  /**
3485   * Bind to the selection menu.
3486   *
3487   * @param { RichEditorSpanType } spanType - Indicates the type of selection menu.
3488   * @param { CustomBuilder } content - Indicates the content of selection menu.
3489   * @param { ResponseType | RichEditorResponseType } responseType - Indicates response type of selection menu.
3490   * @param { SelectionMenuOptions } [options] - Indicates the options of selection menu.
3491   * @returns { RichEditorAttribute }
3492   * @syscap SystemCapability.ArkUI.ArkUI.Full
3493   * @crossplatform
3494   * @atomicservice
3495   * @since 11
3496   */
3497  bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType,
3498    options?: SelectionMenuOptions): RichEditorAttribute;
3499
3500  /**
3501   * Define custom keyboard.
3502   *
3503   * @param { CustomBuilder } value
3504   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3505   * @syscap SystemCapability.ArkUI.ArkUI.Full
3506   * @since 10
3507   */
3508  /**
3509   * Define custom keyboard.
3510   *
3511   * @param { CustomBuilder } value
3512   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3513   * @syscap SystemCapability.ArkUI.ArkUI.Full
3514   * @crossplatform
3515   * @atomicservice
3516   * @since 11
3517   */
3518  /**
3519   * Define custom keyboard.
3520   *
3521   * @param { CustomBuilder } value - Set up a custom keyboard of RichEditor
3522   * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of RichEditor
3523   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3524   * @syscap SystemCapability.ArkUI.ArkUI.Full
3525   * @crossplatform
3526   * @atomicservice
3527   * @since 12
3528   */
3529  customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute;
3530
3531  /**
3532    * Defines onPaste callback.
3533    *
3534    * @param { function } callback Executed when a paste operation is performed.
3535    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3536    * @syscap SystemCapability.ArkUI.ArkUI.Full
3537    * @crossplatform
3538    * @since 11
3539    */
3540   /**
3541    * Defines onPaste callback.
3542    *
3543    * @param { PasteEventCallback } callback Executed when a paste operation is performed.
3544    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3545    * @syscap SystemCapability.ArkUI.ArkUI.Full
3546    * @crossplatform
3547    * @atomicservice
3548    * @since 12
3549    */
3550  onPaste(callback: PasteEventCallback): RichEditorAttribute;
3551
3552  /**
3553   * Enable data detector.
3554   *
3555   * @param { boolean } enable - Enable data detector.
3556   * @returns { RichEditorAttribute } The attribute of the rich editor.
3557   * @syscap SystemCapability.ArkUI.ArkUI.Full
3558   * @crossplatform
3559   * @since 11
3560   */
3561  /**
3562   * Enable data detector.
3563   *
3564   * @param { boolean } enable - Enable data detector.
3565   * @returns { RichEditorAttribute } The attribute of the rich editor.
3566   * @syscap SystemCapability.ArkUI.ArkUI.Full
3567   * @crossplatform
3568   * @atomicservice
3569   * @since 12
3570   */
3571  enableDataDetector(enable: boolean): RichEditorAttribute;
3572
3573  /**
3574   * Enable preview text.
3575   *
3576   * @param { boolean } enable - Enable preview text.
3577   * @returns { RichEditorAttribute } The attribute of the rich editor.
3578   * @syscap SystemCapability.ArkUI.ArkUI.Full
3579   * @crossplatform
3580   * @atomicservice
3581   * @since 12
3582   */
3583  enablePreviewText(enable: boolean): RichEditorAttribute;
3584
3585  /**
3586   * Data detector with config.
3587   *
3588   * @param { TextDataDetectorConfig } config - The config of text data detector.
3589   * @returns { RichEditorAttribute } The attribute of the rich editor.
3590   * @syscap SystemCapability.ArkUI.ArkUI.Full
3591   * @crossplatform
3592   * @since 11
3593   */
3594  /**
3595   * Data detector with config.
3596   *
3597   * @param { TextDataDetectorConfig } config - The config of text data detector.
3598   * @returns { RichEditorAttribute } The attribute of the rich editor.
3599   * @syscap SystemCapability.ArkUI.ArkUI.Full
3600   * @crossplatform
3601   * @atomicservice
3602   * @since 12
3603   */
3604  dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute;
3605
3606  /**
3607   * Set richEditor placeholder.
3608   *
3609   * @param { ResourceStr } value - The value of placeholder.
3610   * @param { PlaceholderStyle } [style] - The style of placeholder.
3611   * @returns { RichEditorAttribute } The attribute of the rich editor.
3612   * @syscap SystemCapability.ArkUI.ArkUI.Full
3613   * @crossplatform
3614   * @atomicservice
3615   * @since 12
3616   */
3617  placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute;
3618
3619   /**
3620   * Set caret color of rich editor.
3621   *
3622   * @param { ResourceColor } value - Custom color types.
3623   * @returns { RichEditorAttribute } The attribute of the rich editor.
3624   * @syscap SystemCapability.ArkUI.ArkUI.Full
3625   * @crossplatform
3626   * @atomicservice
3627   * @since 12
3628   */
3629  caretColor(value: ResourceColor): RichEditorAttribute;
3630
3631  /**
3632   * Set background color of selected text in rich editor.
3633   *
3634   * @param { ResourceColor } value - Custom color types.
3635   * @returns { RichEditorAttribute } The attribute of the rich editor.
3636   * @syscap SystemCapability.ArkUI.ArkUI.Full
3637   * @crossplatform
3638   * @atomicservice
3639   * @since 12
3640   */
3641  selectedBackgroundColor(value: ResourceColor): RichEditorAttribute;
3642
3643  /**
3644   * Called when edit status is changed
3645   *
3646   * @param { Callback<boolean> } callback - when edit status is changed
3647   * @returns { RichEditorAttribute } returns The attribute of the rich editor.
3648   * @syscap SystemCapability.ArkUI.ArkUI.Full
3649   * @crossplatform
3650   * @atomicservice
3651   * @since 12
3652   */
3653  onEditingChange(callback: Callback<boolean>): RichEditorAttribute;
3654
3655  /**
3656   * Set enter key type of soft keyboard.
3657   *
3658   * @param { EnterKeyType } value - the enter key type of soft keyboard
3659   * @returns { RichEditorAttribute }
3660   * @syscap SystemCapability.ArkUI.ArkUI.Full
3661   * @crossplatform
3662   * @atomicservice
3663   * @since 12
3664   */
3665  enterKeyType(value: EnterKeyType): RichEditorAttribute;
3666
3667  /**
3668   * Called when submitted.
3669   *
3670   * @param { SubmitCallback } callback - callback of the listened event.
3671   * @returns { RichEditorAttribute }
3672   * @syscap SystemCapability.ArkUI.ArkUI.Full
3673   * @crossplatform
3674   * @atomicservice
3675   * @since 12
3676   */
3677  onSubmit(callback: SubmitCallback): RichEditorAttribute;
3678
3679  /**
3680   * Called before text changed.
3681   *
3682   * @param { Callback<RichEditorChangeValue, boolean> } callback - The triggered function before text content is about to change.
3683   * @returns { RichEditorAttribute }
3684   * @syscap SystemCapability.ArkUI.ArkUI.Full
3685   * @crossplatform
3686   * @atomicservice
3687   * @since 12
3688   */
3689  onWillChange(callback: Callback<RichEditorChangeValue, boolean>) : RichEditorAttribute;
3690
3691  /**
3692   * Called after text changed.
3693   *
3694   * @param { OnDidChangeCallback } callback - The triggered function after content changed.
3695   * @returns { RichEditorAttribute }
3696   * @syscap SystemCapability.ArkUI.ArkUI.Full
3697   * @crossplatform
3698   * @atomicservice
3699   * @since 12
3700   */
3701  onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute;
3702
3703  /**
3704    * Called before the cut event.
3705    *
3706    * @param { Callback<CutEvent> } callback - Called before the cut event.
3707    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3708    * @syscap SystemCapability.ArkUI.ArkUI.Full
3709    * @crossplatform
3710    * @atomicservice
3711    * @since 12
3712    */
3713  onCut(callback: Callback<CutEvent>): RichEditorAttribute;
3714
3715  /**
3716    * Called before the copy event.
3717    *
3718    * @param { Callback<CopyEvent> } callback - Called before the copy event.
3719    * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3720    * @syscap SystemCapability.ArkUI.ArkUI.Full
3721    * @crossplatform
3722    * @atomicservice
3723    * @since 12
3724    */
3725  onCopy(callback: Callback<CopyEvent>): RichEditorAttribute;
3726
3727  /**
3728   * Set the custom text menu.
3729   *
3730   * @param { EditMenuOptions } editMenu - Customize text menu options.
3731   * @returns { RichEditorAttribute }
3732   * @syscap SystemCapability.ArkUI.ArkUI.Full
3733   * @crossplatform
3734   * @atomicservice
3735   * @since 12
3736   */
3737  editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute;
3738
3739  /**
3740   * Sets whether request keyboard or not when on focus.
3741   *
3742   * @param { boolean } isEnabled - Whether enable request keyboard when on focus.
3743   * @returns { RichEditorAttribute } Returns the instance of the RichEditorAttribute.
3744   * @syscap SystemCapability.ArkUI.ArkUI.Full
3745   * @crossplatform
3746   * @atomicservice
3747   * @since 12
3748   */
3749  enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute;
3750
3751  /**
3752   * Enable or disable haptic feedback.
3753   *
3754   * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback.
3755   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3756   * @syscap SystemCapability.ArkUI.ArkUI.Full
3757   * @crossplatform
3758   * @atomicservice
3759   * @since 13
3760   */
3761  enableHapticFeedback(isEnabled: boolean): RichEditorAttribute;
3762
3763  /**
3764   * Define bar state of the RichEditor.
3765   *
3766   * @param { BarState } state - bar state.
3767   * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute.
3768   * @syscap SystemCapability.ArkUI.ArkUI.Full
3769   * @crossplatform
3770   * @atomicservice
3771   * @since 13
3772   */
3773  barState(state: BarState): RichEditorAttribute;
3774}
3775
3776/**
3777 * the callback of cut event.
3778 * @interface CutEvent
3779 * @syscap SystemCapability.ArkUI.ArkUI.Full
3780 * @crossplatform
3781 * @atomicservice
3782 * @since 12
3783 */
3784declare interface CutEvent {
3785  /**
3786   * Prevent system cut event.
3787   *
3788   * @type { ?Callback<void> }
3789   * @syscap SystemCapability.ArkUI.ArkUI.Full
3790   * @crossplatform
3791   * @atomicservice
3792   * @since 12
3793   */
3794  preventDefault?: Callback<void>;
3795}
3796
3797/**
3798 * the callback of copy event.
3799 * @interface CopyEvent
3800 * @syscap SystemCapability.ArkUI.ArkUI.Full
3801 * @crossplatform
3802 * @atomicservice
3803 * @since 12
3804 */
3805declare interface CopyEvent {
3806  /**
3807   * Prevent system cut event.
3808   *
3809   * @type { ?Callback<void> }
3810   * @syscap SystemCapability.ArkUI.ArkUI.Full
3811   * @crossplatform
3812   * @atomicservice
3813   * @since 12
3814   */
3815  preventDefault?: Callback<void>;
3816}
3817
3818/**
3819 * callback of the listened enter key event.
3820 *
3821 * @typedef { function } SubmitCallback
3822 * @param { EnterKeyType } enterKey - the enter key type of soft keyboard.
3823 * @param { SubmitEvent } event - Provides the method of keeping RichEditor editable state when submitted.
3824 * @syscap SystemCapability.ArkUI.ArkUI.Full
3825 * @crossplatform
3826 * @atomicservice
3827 * @since 12
3828 */
3829declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void;
3830
3831/**
3832 * Callback function when the selection menu appears.
3833 *
3834 * @typedef { function } MenuOnAppearCallback
3835 * @param { number } start - Start offset of the selected content in rich editor.
3836 * @param { number } end - End offset of the selected content in rich editor.
3837 * @syscap SystemCapability.ArkUI.ArkUI.Full
3838 * @crossplatform
3839 * @atomicservice
3840 * @since 12
3841 */
3842declare type MenuOnAppearCallback = (start: number, end: number) => void;
3843
3844/**
3845 * Callback function when a paste operation is performed.
3846 *
3847 * @typedef { function } PasteEventCallback
3848 * @param { PasteEvent } [event] - The paste event.
3849 * @syscap SystemCapability.ArkUI.ArkUI.Full
3850 * @crossplatform
3851 * @atomicservice
3852 * @since 12
3853 */
3854declare type PasteEventCallback = (event?: PasteEvent) => void;
3855
3856/**
3857 * Provides an interface for writing texts.
3858 *
3859 * @interface RichEditorInterface
3860 * @syscap SystemCapability.ArkUI.ArkUI.Full
3861 * @since 10
3862 */
3863/**
3864 * Provides an interface for writing texts.
3865 *
3866 * @interface RichEditorInterface
3867 * @syscap SystemCapability.ArkUI.ArkUI.Full
3868 * @crossplatform
3869 * @atomicservice
3870 * @since 11
3871 */
3872interface RichEditorInterface {
3873  /**
3874   * Called when create RichEditor.
3875   *
3876   * @param { RichEditorOptions } value
3877   * @returns { RichEditorAttribute }
3878   * @syscap SystemCapability.ArkUI.ArkUI.Full
3879   * @since 10
3880   */
3881  /**
3882   * Called when create RichEditor.
3883   *
3884   * @param { RichEditorOptions } value
3885   * @returns { RichEditorAttribute }
3886   * @syscap SystemCapability.ArkUI.ArkUI.Full
3887   * @crossplatform
3888   * @atomicservice
3889   * @since 11
3890   */
3891  (value: RichEditorOptions): RichEditorAttribute;
3892
3893  /**
3894   * Called when create RichEditor with StyledString.
3895   *
3896   * @param { RichEditorStyledStringOptions} options
3897   * @returns { RichEditorAttribute }
3898   * @syscap SystemCapability.ArkUI.ArkUI.Full
3899   * @crossplatform
3900   * @atomicservice
3901   * @since 12
3902   */
3903  (options: RichEditorStyledStringOptions): RichEditorAttribute;
3904}
3905
3906/**
3907 * Defines RichEditor Component instance.
3908 *
3909 * @syscap SystemCapability.ArkUI.ArkUI.Full
3910 * @since 10
3911 */
3912/**
3913 * Defines RichEditor Component instance.
3914 *
3915 * @syscap SystemCapability.ArkUI.ArkUI.Full
3916 * @crossplatform
3917 * @atomicservice
3918 * @since 11
3919 */
3920declare const RichEditorInstance: RichEditorAttribute;
3921
3922/**
3923 * Defines RichEditor Component.
3924 *
3925 * @syscap SystemCapability.ArkUI.ArkUI.Full
3926 * @since 10
3927 */
3928/**
3929 * Defines RichEditor Component.
3930 *
3931 * @syscap SystemCapability.ArkUI.ArkUI.Full
3932 * @crossplatform
3933 * @atomicservice
3934 * @since 11
3935 */
3936declare const RichEditor: RichEditorInterface;
3937