You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
247
249
*
248
250
* @experimental
249
-
* Base character styles that can be applied to a range of characters.
251
+
* Base character styles that can be applied to any range of characters.
252
+
* Excludes font style, which differs between the getter-oriented {@link CharacterStyles} interface and the
253
+
* setter-oriented {@link CharacterStylesInput}.
250
254
*/
251
255
declareinterfaceBaseCharacterStyles{
256
+
/**
257
+
* Size of the text in points.
258
+
*/
252
259
fontSize: number;
260
+
/**
261
+
* Text color.
262
+
*/
253
263
color: Color;
254
-
tracking: number;
264
+
/**
265
+
* Uniformly adjusts the letter spacing, aka character spacing. Specified as a delta relative to the font's default
266
+
* spacing, in units of 1/1000 em: positive values increase the spacing, negative values tighten the spacing, and 0
267
+
* leaves spacing at its default.
268
+
*/
269
+
letterSpacing: number;
270
+
/**
271
+
* Adds an underline to text.
272
+
*/
255
273
underline: boolean;
256
274
}
257
275
@@ -415,7 +433,8 @@ declare enum BlendMode {
415
433
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
416
434
*
417
435
* @experimental
418
-
* Text styles of a range of characters, even a short span like a single word.
436
+
* Text styles that can be applied to any range of characters, even a short span like a single word. (Contrast with
437
+
* ParagraphStyles, which must be applied to an entire paragraph atomically).
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
428
447
*
429
448
* @experimental
430
-
* Input shape of the applyCharacterStyle API.
449
+
* Variant of {@link CharacterStyles} with all style fields optional, used for applyCharacterStyles(). When using that API,
450
+
* any fields not specified are left unchanged, preserving the text's existing styles.
451
+
*
452
+
* If specified, the font must be of the {@link AvailableFont} type – one that is guaranteed to be available for the current
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
440
463
*
441
464
* @experimental
442
-
* Output shape of the characterStyleRange getter.
465
+
* A set of {@link CharacterStyles} along with the range of characters they apply to. Seen in the characterStyleRanges
466
+
* getter.
467
+
*
468
+
* Note that fonts returned by the getter are *not* guaranteed to be ones the user has rights to edit with, even though they
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
450
477
*
451
478
* @experimental
452
-
* Input shape of the characterStyleRange setter.
479
+
* Variant of {@link CharacterStylesRange} with all style fields optional, along with the range of characters they apply to.
480
+
* Used for the characterStyleRanges setter. When invoking the setter, any fields not specified are reset to their defaults.
481
+
*
482
+
* If specified, the font must be of the {@link AvailableFont} type – one that is guaranteed to be available for the current
@@ -1733,7 +1793,13 @@ export declare class TextContentModel {
1733
1793
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
1734
1794
*
1735
1795
* @experimental
1736
-
* The character style ranges of this text content.
1796
+
* The character styles applied to different ranges of this text content. When setting character styles, any style
1797
+
* properties that are not provided are reset to their defaults (contrast to {@link applyCharacterStyles} which
1798
+
* preserves the text's existing styles for any fields not specified). When *getting* styles, all fields are always
1799
+
* provided.
1800
+
*
1801
+
* Note: existing fonts used in the document, returned by this getter, are not guaranteed to be ones the current user
1802
+
* has rights to edit with. The *setter* only accepts the AvailableFont type which has been verified to be usable.
@@ -1743,8 +1809,11 @@ export declare class TextContentModel {
1743
1809
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
1744
1810
*
1745
1811
* @experimental
1746
-
* Apply one or more styles to the characters in the given range, leaving other styles in this range unchanged. Does
1747
-
* not modify any styles in the text outside this range.
1812
+
* Apply one or more styles to the characters in the given range, leaving any style properties that were not specified
1813
+
* unchanged. Does not modify any styles in the text outside this range. Contrast to the {@link characterStyleRanges}
1814
+
* setter, which specifies new style range(s) for the entire text at once, and resets any unspecified properties back to
1815
+
* default styles.
1816
+
1748
1817
* @param styles - The styles to apply.
1749
1818
* @param range - The start and length of character sequence to which the styles should be applied.
1750
1819
* If not specified the styles will be applied to the entire piece of text content flow.
@@ -1761,7 +1830,10 @@ export declare class TextContentModel {
1761
1830
/**
1762
1831
* A TextNode represents a text display frame in the scenegraph. It may display an entire piece of text, or sometimes just
1763
1832
* a subset of longer text that flows across multiple TextNode "frames". Because of this, the TextNode does not directly hold
1764
-
* the text content and styles – instead it refers to a {@link TextContentModel}, which may be shared across multiple TextNodes.
1833
+
* the text content and styles – instead it refers to a {@link TextContentModel}, which may be shared across multiple TextNode frames.
1834
+
*
1835
+
* To create new a single-frame piece of text, see {@link Editor.createText}. APIs are not yet available to create
0 commit comments