roosterjs 8.10.0 → 8.11.2
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 +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 +46 -13
- package/dist/rooster-amd.js +1262 -1035
- 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 +46 -13
- package/dist/rooster.js +1262 -1035
- package/dist/rooster.js.map +1 -1
- package/lib/index.js +18 -10
- package/lib/index.js.map +1 -1
- package/lib-amd/index.js +18 -10
- package/lib-amd/index.js.map +1 -1
- package/package.json +6 -6
- package/test/createEditorTest.js +52 -51
- package/test/createEditorTest.js.map +1 -1
- package/tsconfig.child.tsbuildinfo +1 -0
- package/lib-amd/createEditor.d.ts +0 -10
- package/lib-amd/index.d.ts +0 -7
- package/test/createEditorTest.d.ts +0 -1
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.11.2)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -347,7 +347,11 @@ export const enum Keys {
|
|
|
347
347
|
RIGHT = 39,
|
|
348
348
|
DOWN = 40,
|
|
349
349
|
DELETE = 46,
|
|
350
|
+
/**
|
|
351
|
+
* @deprecated Just for backward compatibility
|
|
352
|
+
*/
|
|
350
353
|
EIGHT_ASTIRISK = 56,
|
|
354
|
+
EIGHT_ASTERISK = 56,
|
|
351
355
|
B = 66,
|
|
352
356
|
I = 73,
|
|
353
357
|
U = 85,
|
|
@@ -356,7 +360,11 @@ export const enum Keys {
|
|
|
356
360
|
COMMA = 188,
|
|
357
361
|
DASH_UNDERSCORE = 189,
|
|
358
362
|
PERIOD = 190,
|
|
363
|
+
/**
|
|
364
|
+
* @deprecated Just for backward compatibility
|
|
365
|
+
*/
|
|
359
366
|
FORWARDSLASH = 191,
|
|
367
|
+
FORWARD_SLASH = 191,
|
|
360
368
|
GRAVE_TILDE = 192,
|
|
361
369
|
CONTENTCHANGED = 257,
|
|
362
370
|
RANGE = 258,
|
|
@@ -1017,7 +1025,7 @@ export const enum ClearFormatMode {
|
|
|
1017
1025
|
*/
|
|
1018
1026
|
Block = 1,
|
|
1019
1027
|
/**
|
|
1020
|
-
* Detect Inline or Block format based on the current editor
|
|
1028
|
+
* Detect Inline or Block format based on the current editor selector.
|
|
1021
1029
|
*/
|
|
1022
1030
|
AutoDetect = 2
|
|
1023
1031
|
}
|
|
@@ -1027,7 +1035,7 @@ export const enum ClearFormatMode {
|
|
|
1027
1035
|
*/
|
|
1028
1036
|
export const enum KnownCreateElementDataIndex {
|
|
1029
1037
|
/**
|
|
1030
|
-
* Set a none value to help createElement
|
|
1038
|
+
* Set a none value to help createElement function ignore falsy value
|
|
1031
1039
|
*/
|
|
1032
1040
|
None = 0,
|
|
1033
1041
|
/**
|
|
@@ -1055,7 +1063,7 @@ export const enum KnownCreateElementDataIndex {
|
|
|
1055
1063
|
*/
|
|
1056
1064
|
ImageEditWrapper = 6,
|
|
1057
1065
|
/**
|
|
1058
|
-
* Table
|
|
1066
|
+
* Table resizer elements
|
|
1059
1067
|
*/
|
|
1060
1068
|
TableHorizontalResizer = 7,
|
|
1061
1069
|
TableVerticalResizer = 8,
|
|
@@ -2267,9 +2275,10 @@ export interface SanitizeHtmlOptions extends HtmlSanitizerOptions {
|
|
|
2267
2275
|
*
|
|
2268
2276
|
* !!!Note: This file is generated from /tools/generateTargetWindow.js. Do NOT modify this file directly!!!
|
|
2269
2277
|
*/
|
|
2270
|
-
export interface
|
|
2278
|
+
export interface TargetWindowBase {
|
|
2271
2279
|
Range: Range;
|
|
2272
2280
|
Node: Node;
|
|
2281
|
+
ParentNode: ParentNode;
|
|
2273
2282
|
Element: Element;
|
|
2274
2283
|
SVGElement: SVGElement;
|
|
2275
2284
|
SVGViewElement: SVGViewElement;
|
|
@@ -2282,6 +2291,7 @@ export interface TargetWindow {
|
|
|
2282
2291
|
SVGMetadataElement: SVGMetadataElement;
|
|
2283
2292
|
SVGMaskElement: SVGMaskElement;
|
|
2284
2293
|
SVGMarkerElement: SVGMarkerElement;
|
|
2294
|
+
SVGMPathElement: SVGMPathElement;
|
|
2285
2295
|
SVGGraphicsElement: SVGGraphicsElement;
|
|
2286
2296
|
SVGUseElement: SVGUseElement;
|
|
2287
2297
|
SVGTextContentElement: SVGTextContentElement;
|
|
@@ -2291,12 +2301,12 @@ export interface TargetWindow {
|
|
|
2291
2301
|
SVGTextPathElement: SVGTextPathElement;
|
|
2292
2302
|
SVGSwitchElement: SVGSwitchElement;
|
|
2293
2303
|
SVGSVGElement: SVGSVGElement;
|
|
2294
|
-
SVGPathElement: SVGPathElement;
|
|
2295
2304
|
SVGImageElement: SVGImageElement;
|
|
2296
2305
|
SVGGeometryElement: SVGGeometryElement;
|
|
2297
2306
|
SVGRectElement: SVGRectElement;
|
|
2298
2307
|
SVGPolylineElement: SVGPolylineElement;
|
|
2299
2308
|
SVGPolygonElement: SVGPolygonElement;
|
|
2309
|
+
SVGPathElement: SVGPathElement;
|
|
2300
2310
|
SVGLineElement: SVGLineElement;
|
|
2301
2311
|
SVGEllipseElement: SVGEllipseElement;
|
|
2302
2312
|
SVGCircleElement: SVGCircleElement;
|
|
@@ -2330,7 +2340,6 @@ export interface TargetWindow {
|
|
|
2330
2340
|
SVGFEColorMatrixElement: SVGFEColorMatrixElement;
|
|
2331
2341
|
SVGFEBlendElement: SVGFEBlendElement;
|
|
2332
2342
|
SVGDescElement: SVGDescElement;
|
|
2333
|
-
SVGCursorElement: SVGCursorElement;
|
|
2334
2343
|
SVGComponentTransferFunctionElement: SVGComponentTransferFunctionElement;
|
|
2335
2344
|
SVGFEFuncRElement: SVGFEFuncRElement;
|
|
2336
2345
|
SVGFEFuncGElement: SVGFEFuncGElement;
|
|
@@ -2338,9 +2347,11 @@ export interface TargetWindow {
|
|
|
2338
2347
|
SVGFEFuncAElement: SVGFEFuncAElement;
|
|
2339
2348
|
SVGClipPathElement: SVGClipPathElement;
|
|
2340
2349
|
SVGAnimationElement: SVGAnimationElement;
|
|
2350
|
+
SVGSetElement: SVGSetElement;
|
|
2341
2351
|
SVGAnimateTransformElement: SVGAnimateTransformElement;
|
|
2342
2352
|
SVGAnimateMotionElement: SVGAnimateMotionElement;
|
|
2343
2353
|
SVGAnimateElement: SVGAnimateElement;
|
|
2354
|
+
MathMLElement: MathMLElement;
|
|
2344
2355
|
HTMLElement: HTMLElement;
|
|
2345
2356
|
HTMLUnknownElement: HTMLUnknownElement;
|
|
2346
2357
|
HTMLUListElement: HTMLUListElement;
|
|
@@ -2410,11 +2421,9 @@ export interface TargetWindow {
|
|
|
2410
2421
|
HTMLCanvasElement: HTMLCanvasElement;
|
|
2411
2422
|
HTMLButtonElement: HTMLButtonElement;
|
|
2412
2423
|
HTMLBodyElement: HTMLBodyElement;
|
|
2413
|
-
HTMLBaseFontElement: HTMLBaseFontElement;
|
|
2414
2424
|
HTMLBaseElement: HTMLBaseElement;
|
|
2415
2425
|
HTMLBRElement: HTMLBRElement;
|
|
2416
2426
|
HTMLAreaElement: HTMLAreaElement;
|
|
2417
|
-
HTMLAppletElement: HTMLAppletElement;
|
|
2418
2427
|
HTMLAnchorElement: HTMLAnchorElement;
|
|
2419
2428
|
DocumentType: DocumentType;
|
|
2420
2429
|
DocumentFragment: DocumentFragment;
|
|
@@ -2431,6 +2440,24 @@ export interface TargetWindow {
|
|
|
2431
2440
|
Attr: Attr;
|
|
2432
2441
|
}
|
|
2433
2442
|
|
|
2443
|
+
/**
|
|
2444
|
+
* Define DOM types of window, used by safeInstanceOf() to check if a given object is of the specified type of its own window
|
|
2445
|
+
*/
|
|
2446
|
+
export interface TargetWindow extends TargetWindowBase {
|
|
2447
|
+
/**
|
|
2448
|
+
* @deprecated Just for backward compatibility
|
|
2449
|
+
*/
|
|
2450
|
+
SVGCursorElement: Element;
|
|
2451
|
+
/**
|
|
2452
|
+
* @deprecated Just for backward compatibility
|
|
2453
|
+
*/
|
|
2454
|
+
HTMLBaseFontElement: Element;
|
|
2455
|
+
/**
|
|
2456
|
+
* @deprecated Just for backward compatibility
|
|
2457
|
+
*/
|
|
2458
|
+
HTMLAppletElement: Element;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2434
2461
|
/**
|
|
2435
2462
|
* Interface of roosterjs editor object
|
|
2436
2463
|
*/
|
|
@@ -2804,7 +2831,7 @@ export interface IEditor {
|
|
|
2804
2831
|
*/
|
|
2805
2832
|
getStyleBasedFormatState(node?: Node): StyleBasedFormatState;
|
|
2806
2833
|
/**
|
|
2807
|
-
* Get the pendable format state from the current selection,
|
|
2834
|
+
* Get the pendable format state from the current selection, including formats as underline, bold, italics
|
|
2808
2835
|
* @param forceGetStateFromDOM If set to true, will not consider the cached format and will get the format state directly from DOM tree
|
|
2809
2836
|
* @return The pending format state of editor.
|
|
2810
2837
|
*/
|
|
@@ -3483,7 +3510,7 @@ export interface EntityFeatureSettings {
|
|
|
3483
3510
|
*/
|
|
3484
3511
|
export interface ListFeatureSettings {
|
|
3485
3512
|
/**
|
|
3486
|
-
* When press space after an
|
|
3513
|
+
* When press space after an asterisk or number in an empty line, toggle bullet/numbering
|
|
3487
3514
|
* @default true
|
|
3488
3515
|
*/
|
|
3489
3516
|
autoBullet: boolean;
|
|
@@ -3835,7 +3862,7 @@ export interface ImageEditOptions {
|
|
|
3835
3862
|
}
|
|
3836
3863
|
|
|
3837
3864
|
/**
|
|
3838
|
-
* An interface represents the data for creating element used by
|
|
3865
|
+
* An interface represents the data for creating element used by createElement()
|
|
3839
3866
|
*/
|
|
3840
3867
|
export interface CreateElementData {
|
|
3841
3868
|
/**
|
|
@@ -4699,7 +4726,7 @@ export function wrap(nodes: Node | Node[], wrapper?: string): HTMLElement;
|
|
|
4699
4726
|
export function wrap(nodes: Node | Node[], wrapper?: HTMLElement): HTMLElement;
|
|
4700
4727
|
|
|
4701
4728
|
/**
|
|
4702
|
-
*
|
|
4729
|
+
* Wraps all the nodes with CreateElementData or an index of a known CreateElementData
|
|
4703
4730
|
* @param nodes The nodes to wrap
|
|
4704
4731
|
* @param wrapper The CreateElementData or an index of a known CreateElementData
|
|
4705
4732
|
*/
|
|
@@ -6925,6 +6952,12 @@ export class TableResize implements EditorPlugin {
|
|
|
6925
6952
|
private frameAnimateResizeCells;
|
|
6926
6953
|
private resizeTable;
|
|
6927
6954
|
private resizeRows;
|
|
6955
|
+
/**
|
|
6956
|
+
*
|
|
6957
|
+
* @param newPos The position to where we want to move the vertical border
|
|
6958
|
+
* @returns if the move is allowed, or, if any of the cells on either side of the vertical border is smaller than
|
|
6959
|
+
* the minimum width, such move is not allowed
|
|
6960
|
+
*/
|
|
6928
6961
|
private canResizeColumns;
|
|
6929
6962
|
private resizeColumns;
|
|
6930
6963
|
private resizeCells;
|