roosterjs 9.56.0 → 9.58.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/README.md +8 -0
- package/dist/rooster-adapter-amd-min.js +1 -1
- package/dist/rooster-adapter-amd-min.js.map +1 -1
- package/dist/rooster-adapter-amd.js +90 -6
- package/dist/rooster-adapter-amd.js.map +1 -1
- package/dist/rooster-adapter-min.js +1 -1
- package/dist/rooster-adapter-min.js.map +1 -1
- package/dist/rooster-adapter.js +90 -6
- package/dist/rooster-adapter.js.map +1 -1
- package/dist/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.d.ts +66 -6
- package/dist/rooster-amd.js +703 -234
- 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-react-amd-min.js +1 -1
- package/dist/rooster-react-amd-min.js.map +1 -1
- package/dist/rooster-react-amd.d.ts +1 -1
- package/dist/rooster-react-amd.js +145 -62
- package/dist/rooster-react-amd.js.map +1 -1
- package/dist/rooster-react-min.js +1 -1
- package/dist/rooster-react-min.js.map +1 -1
- package/dist/rooster-react.d.ts +1 -1
- package/dist/rooster-react.js +143 -60
- package/dist/rooster-react.js.map +1 -1
- package/dist/rooster.d.ts +66 -6
- package/dist/rooster.js +703 -234
- package/dist/rooster.js.map +1 -1
- package/package.json +7 -7
package/dist/rooster.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for roosterjs (Version 9.
|
|
1
|
+
// Type definitions for roosterjs (Version 9.58.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -3891,6 +3891,11 @@ interface IEditor {
|
|
|
3891
3891
|
* @param featureName The name of feature to check
|
|
3892
3892
|
*/
|
|
3893
3893
|
isExperimentalFeatureEnabled(featureName: ExperimentalFeature | string): boolean;
|
|
3894
|
+
/**
|
|
3895
|
+
* Get all experimental features enabled in this editor
|
|
3896
|
+
* @returns An array of experimental feature names
|
|
3897
|
+
*/
|
|
3898
|
+
getExperimentalFeatures(): ExperimentalFeature[];
|
|
3894
3899
|
}
|
|
3895
3900
|
|
|
3896
3901
|
/**
|
|
@@ -3921,7 +3926,11 @@ type ExperimentalFeature = GraduatedExperimentalFeature
|
|
|
3921
3926
|
* These characters can be used to hide text in HTML and may cause unexpected behavior.
|
|
3922
3927
|
* @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/
|
|
3923
3928
|
*/
|
|
3924
|
-
| 'FilterInvisibleUnicode'
|
|
3929
|
+
| 'FilterInvisibleUnicode'
|
|
3930
|
+
/**
|
|
3931
|
+
* Handle the drop event for content that is dropped from the same editor instance.
|
|
3932
|
+
*/
|
|
3933
|
+
| 'HandleDropInternalContent';
|
|
3925
3934
|
|
|
3926
3935
|
/**
|
|
3927
3936
|
* Predefined experiment features (Graduated, only keep them for backward compatibility)
|
|
@@ -5102,6 +5111,10 @@ interface FormatContentModelOptions {
|
|
|
5102
5111
|
* When pass to true, scroll the editing caret into view after write DOM tree if need
|
|
5103
5112
|
*/
|
|
5104
5113
|
scrollCaretIntoView?: boolean;
|
|
5114
|
+
/**
|
|
5115
|
+
* When pass to true, skip setting DOM selection after write DOM tree. @default false
|
|
5116
|
+
*/
|
|
5117
|
+
skipDOMSelection?: boolean;
|
|
5105
5118
|
}
|
|
5106
5119
|
|
|
5107
5120
|
/**
|
|
@@ -5260,9 +5273,19 @@ interface ContentModelFormatState {
|
|
|
5260
5273
|
|
|
5261
5274
|
/**
|
|
5262
5275
|
* Represents the PasteType parameter used to set the paste type to use.
|
|
5263
|
-
* It can be either the Paste Type value or a callback that
|
|
5276
|
+
* It can be either the Paste Type value or a callback that returns the Paste Type to use.
|
|
5264
5277
|
*/
|
|
5265
|
-
type PasteTypeOrGetter = PasteType |
|
|
5278
|
+
type PasteTypeOrGetter = PasteType | PasteTypeGetter;
|
|
5279
|
+
|
|
5280
|
+
/**
|
|
5281
|
+
* A function that returns the Paste Type to use based on the pasted content and clipboard data.
|
|
5282
|
+
* @param document The document parsed from the clipboard raw HTML, or null when there is no HTML
|
|
5283
|
+
* @param clipboardData Clipboard data retrieved from clipboard
|
|
5284
|
+
* @param environment The editor environment information
|
|
5285
|
+
* @param htmlAttributes The metadata (HTML attributes) retrieved from the pasted content
|
|
5286
|
+
* @returns The Paste Type to use
|
|
5287
|
+
*/
|
|
5288
|
+
type PasteTypeGetter = (document: Document | null, clipboardData: ClipboardData, environment: EditorEnvironment, htmlAttributes: Record<string, string>) => PasteType;
|
|
5266
5289
|
|
|
5267
5290
|
/**
|
|
5268
5291
|
* Image Format
|
|
@@ -5725,7 +5748,14 @@ type KnownAnnounceStrings = /**
|
|
|
5725
5748
|
* @example
|
|
5726
5749
|
* {0}, unselected
|
|
5727
5750
|
*/
|
|
5728
|
-
| 'unselected'
|
|
5751
|
+
| 'unselected'
|
|
5752
|
+
/**
|
|
5753
|
+
* String announced when a new line is inserted in the editor.
|
|
5754
|
+
* Used when Enter is pressed and a new line is inserted in the editor.
|
|
5755
|
+
* @example
|
|
5756
|
+
* New line inserted
|
|
5757
|
+
*/
|
|
5758
|
+
| 'newLineInserted';
|
|
5729
5759
|
|
|
5730
5760
|
/**
|
|
5731
5761
|
* Options for announcing format changes
|
|
@@ -6042,6 +6072,11 @@ interface MergeModelOption {
|
|
|
6042
6072
|
* Whether to add a paragraph after the merged content.
|
|
6043
6073
|
*/
|
|
6044
6074
|
addParagraphAfterMergedContent?: boolean;
|
|
6075
|
+
/**
|
|
6076
|
+
* Whether to merge into an empty paragraph immediately after a list as a new list item.
|
|
6077
|
+
* @default false
|
|
6078
|
+
*/
|
|
6079
|
+
mergeParagraphAfterList?: boolean;
|
|
6045
6080
|
}
|
|
6046
6081
|
|
|
6047
6082
|
/**
|
|
@@ -7930,6 +7965,16 @@ function normalizeFontFamily(fontFamily: string): string;
|
|
|
7930
7965
|
*/
|
|
7931
7966
|
function extractClipboardItems(items: DataTransferItem[], allowedCustomPasteType?: string[], isPasteNative?: boolean): Promise<ClipboardData>;
|
|
7932
7967
|
|
|
7968
|
+
/**
|
|
7969
|
+
* Create a document fragment from clipboard content using the specified paste type
|
|
7970
|
+
* @param document The document used to create the fragment
|
|
7971
|
+
* @param clipboardData The clipboard data to convert
|
|
7972
|
+
* @param pasteType The paste type that determines which clipboard content to use
|
|
7973
|
+
* @param root The optional root element containing the parsed HTML content
|
|
7974
|
+
* @returns A document fragment containing the content to paste
|
|
7975
|
+
*/
|
|
7976
|
+
function createPasteFragment(document: Document, clipboardData: ClipboardData, pasteType: PasteType, root: HTMLElement | undefined): DocumentFragment;
|
|
7977
|
+
|
|
7933
7978
|
/**
|
|
7934
7979
|
* Gets the cached event data by cache key from event object if there is already one.
|
|
7935
7980
|
* Otherwise, call getter function to create one, and cache it.
|
|
@@ -8387,6 +8432,10 @@ const ChangeSource: {
|
|
|
8387
8432
|
* Content changed by paste
|
|
8388
8433
|
*/
|
|
8389
8434
|
Paste: string;
|
|
8435
|
+
/**
|
|
8436
|
+
* Content changed by auto markdown conversion
|
|
8437
|
+
*/
|
|
8438
|
+
AutoMarkdownConversion: string;
|
|
8390
8439
|
/**
|
|
8391
8440
|
* Content changed by setContent API
|
|
8392
8441
|
*/
|
|
@@ -8428,6 +8477,10 @@ const ChangeSource: {
|
|
|
8428
8477
|
* Content changed by replace
|
|
8429
8478
|
*/
|
|
8430
8479
|
Replace: string;
|
|
8480
|
+
/**
|
|
8481
|
+
* Content changed by dragging content out the editor
|
|
8482
|
+
*/
|
|
8483
|
+
DragOutOfEditor: string;
|
|
8431
8484
|
};
|
|
8432
8485
|
|
|
8433
8486
|
/**
|
|
@@ -8863,6 +8916,11 @@ class Editor implements IEditor {
|
|
|
8863
8916
|
* @param featureName The name of feature to check
|
|
8864
8917
|
*/
|
|
8865
8918
|
isExperimentalFeatureEnabled(featureName: ExperimentalFeature | string): boolean;
|
|
8919
|
+
/**
|
|
8920
|
+
* Get all experimental features enabled in this editor
|
|
8921
|
+
* @returns An array of experimental feature names
|
|
8922
|
+
* */
|
|
8923
|
+
getExperimentalFeatures(): ExperimentalFeature[];
|
|
8866
8924
|
/**
|
|
8867
8925
|
* @returns the current EditorCore object
|
|
8868
8926
|
* @throws a standard Error if there's no core object
|
|
@@ -10934,7 +10992,7 @@ class AnnouncePlugin implements EditorPlugin {
|
|
|
10934
10992
|
class DragAndDropPlugin implements EditorPlugin {
|
|
10935
10993
|
private editor;
|
|
10936
10994
|
private forbiddenElements;
|
|
10937
|
-
private
|
|
10995
|
+
private internalDrag;
|
|
10938
10996
|
private disposer;
|
|
10939
10997
|
/**
|
|
10940
10998
|
* Construct a new instance of DragAndDropPlugin
|
|
@@ -10964,6 +11022,8 @@ class DragAndDropPlugin implements EditorPlugin {
|
|
|
10964
11022
|
* @param event The event to handle:
|
|
10965
11023
|
*/
|
|
10966
11024
|
onPluginEvent(event: PluginEvent): void;
|
|
11025
|
+
private adjustDraggingCursor;
|
|
11026
|
+
private handleDragOutOfTheEditor;
|
|
10967
11027
|
}
|
|
10968
11028
|
|
|
10969
11029
|
/**
|