roosterjs 8.53.0 → 8.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.d.ts +23 -10
- package/dist/rooster-amd.js +213 -153
- package/dist/rooster-amd.js.map +1 -1
- package/dist/rooster-min.js +1 -1
- package/dist/rooster-min.js.map +1 -1
- package/dist/rooster.d.ts +23 -10
- package/dist/rooster.js +213 -153
- package/dist/rooster.js.map +1 -1
- package/package.json +7 -7
package/dist/rooster-amd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for roosterjs (Version 8.
|
|
1
|
+
// Type definitions for roosterjs (Version 8.55.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -2340,8 +2340,9 @@ export class EditorBase<TEditorCore extends EditorCore, TEditorOptions extends E
|
|
|
2340
2340
|
/**
|
|
2341
2341
|
* Transform the given node and all its child nodes to dark mode color if editor is in dark mode
|
|
2342
2342
|
* @param node The node to transform
|
|
2343
|
+
* @param direction The transform direction. @default ColorTransformDirection.LightToDark
|
|
2343
2344
|
*/
|
|
2344
|
-
transformToDarkColor(node: Node): void;
|
|
2345
|
+
transformToDarkColor(node: Node, direction?: ColorTransformDirection | CompatibleColorTransformDirection): void;
|
|
2345
2346
|
/**
|
|
2346
2347
|
* Get a darkColorHandler object for this editor.
|
|
2347
2348
|
*/
|
|
@@ -2469,7 +2470,7 @@ export function createLink(editor: IEditor, link: string, altText?: string, disp
|
|
|
2469
2470
|
* bold, italic, underline, font name, font size, etc.
|
|
2470
2471
|
* @param editor The editor instance
|
|
2471
2472
|
* @param event (Optional) The plugin event, it stores the event cached data for looking up.
|
|
2472
|
-
* In this function the event cache is used to get list state and
|
|
2473
|
+
* In this function the event cache is used to get list state and heading level. If not passed,
|
|
2473
2474
|
* it will query the node within selection to get the info
|
|
2474
2475
|
* @returns The format state at cursor
|
|
2475
2476
|
*/
|
|
@@ -2479,7 +2480,7 @@ export function getFormatState(editor: IEditor, event?: PluginEvent): FormatStat
|
|
|
2479
2480
|
* Get element based Format State at cursor
|
|
2480
2481
|
* @param editor The editor instance
|
|
2481
2482
|
* @param event (Optional) The plugin event, it stores the event cached data for looking up.
|
|
2482
|
-
* In this function the event cache is used to get list state and
|
|
2483
|
+
* In this function the event cache is used to get list state and heading level. If not passed,
|
|
2483
2484
|
* it will query the node within selection to get the info
|
|
2484
2485
|
* @returns An ElementBasedFormatState object
|
|
2485
2486
|
*/
|
|
@@ -2775,13 +2776,19 @@ export function toggleSuperscript(editor: IEditor): void;
|
|
|
2775
2776
|
export function toggleUnderline(editor: IEditor): void;
|
|
2776
2777
|
|
|
2777
2778
|
/**
|
|
2778
|
-
*
|
|
2779
|
+
* Set heading level at selection
|
|
2779
2780
|
* @param editor The editor instance
|
|
2780
|
-
* @param level The
|
|
2781
|
-
* the HTML
|
|
2781
|
+
* @param level The heading level, can be a number from 0 to 6, in which 1 ~ 6 refers to
|
|
2782
|
+
* the HTML heading element <H1> to <H6>, 0 means no heading
|
|
2782
2783
|
* if passed in param is outside the range, will be rounded to nearest number in the range
|
|
2783
2784
|
*/
|
|
2784
|
-
export function
|
|
2785
|
+
export function setHeadingLevel(editor: IEditor, level: number): void;
|
|
2786
|
+
|
|
2787
|
+
/**
|
|
2788
|
+
* @deprecated Use setHeadingLevel instead
|
|
2789
|
+
* Keep this for compatibility only, will be removed in next major release
|
|
2790
|
+
*/
|
|
2791
|
+
export const toggleHeader: typeof setHeadingLevel;
|
|
2785
2792
|
|
|
2786
2793
|
/**
|
|
2787
2794
|
* Set background color of cells.
|
|
@@ -5579,7 +5586,12 @@ export interface ElementBasedFormatState {
|
|
|
5579
5586
|
*/
|
|
5580
5587
|
canAddImageAltText?: boolean;
|
|
5581
5588
|
/**
|
|
5582
|
-
*
|
|
5589
|
+
* Heading level (0-6, 0 means no heading)
|
|
5590
|
+
*/
|
|
5591
|
+
headingLevel?: number;
|
|
5592
|
+
/**
|
|
5593
|
+
* @deprecated Use headingLevel instead
|
|
5594
|
+
* Heading level (0-6, 0 means no heading)
|
|
5583
5595
|
*/
|
|
5584
5596
|
headerLevel?: number;
|
|
5585
5597
|
/**
|
|
@@ -6876,8 +6888,9 @@ export interface IEditor {
|
|
|
6876
6888
|
/**
|
|
6877
6889
|
* Transform the given node and all its child nodes to dark mode color if editor is in dark mode
|
|
6878
6890
|
* @param node The node to transform
|
|
6891
|
+
* @param direction The transform direction. @default ColorTransformDirection.LightToDark
|
|
6879
6892
|
*/
|
|
6880
|
-
transformToDarkColor(node: Node): void;
|
|
6893
|
+
transformToDarkColor(node: Node, direction?: ColorTransformDirection | CompatibleColorTransformDirection): void;
|
|
6881
6894
|
/**
|
|
6882
6895
|
* Get a darkColorHandler object for this editor.
|
|
6883
6896
|
*/
|