roosterjs 8.21.0 → 8.21.1-dev.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/dist/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.js +19612 -21335
- 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.js +19612 -21335
- package/dist/rooster.js.map +1 -1
- package/lib/createEditor.d.ts +10 -10
- package/lib/createEditor.js +31 -31
- package/lib/index.d.ts +7 -7
- package/lib/index.js +21 -21
- package/lib-amd/createEditor.d.ts +10 -10
- package/lib-amd/createEditor.js +30 -30
- package/lib-amd/index.d.ts +7 -7
- package/lib-amd/index.js +22 -22
- package/package.json +6 -18
- package/test/createEditorTest.d.ts +1 -1
- package/test/createEditorTest.js +56 -56
- package/test/createEditorTest.js.map +1 -1
- package/tsconfig.child.tsbuildinfo +1 -1
- package/dist/rooster-amd.d.ts +0 -7582
- package/dist/rooster.d.ts +0 -7584
- package/lib-const-enum/createEditor.d.ts +0 -10
- package/lib-const-enum/createEditor.js +0 -32
- package/lib-const-enum/createEditor.js.map +0 -1
- package/lib-const-enum/index.d.ts +0 -7
- package/lib-const-enum/index.js +0 -22
- package/lib-const-enum/index.js.map +0 -1
package/lib/createEditor.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { EditorPlugin, IEditor } from 'roosterjs-editor-types';
|
|
2
|
-
/**
|
|
3
|
-
* Create an editor instance with most common options
|
|
4
|
-
* @param contentDiv The html div element needed for creating the editor
|
|
5
|
-
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
6
|
-
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
7
|
-
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
8
|
-
* @returns The editor instance
|
|
9
|
-
*/
|
|
10
|
-
export default function createEditor(contentDiv: HTMLDivElement, additionalPlugins?: EditorPlugin[], initialContent?: string): IEditor;
|
|
1
|
+
import { EditorPlugin, IEditor } from 'roosterjs-editor-types';
|
|
2
|
+
/**
|
|
3
|
+
* Create an editor instance with most common options
|
|
4
|
+
* @param contentDiv The html div element needed for creating the editor
|
|
5
|
+
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
6
|
+
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
7
|
+
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
8
|
+
* @returns The editor instance
|
|
9
|
+
*/
|
|
10
|
+
export default function createEditor(contentDiv: HTMLDivElement, additionalPlugins?: EditorPlugin[], initialContent?: string): IEditor;
|
package/lib/createEditor.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var roosterjs_editor_core_1 = require("roosterjs-editor-core");
|
|
4
|
-
var roosterjs_color_utils_1 = require("roosterjs-color-utils");
|
|
5
|
-
var roosterjs_editor_plugins_1 = require("roosterjs-editor-plugins");
|
|
6
|
-
/**
|
|
7
|
-
* Create an editor instance with most common options
|
|
8
|
-
* @param contentDiv The html div element needed for creating the editor
|
|
9
|
-
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
10
|
-
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
11
|
-
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
12
|
-
* @returns The editor instance
|
|
13
|
-
*/
|
|
14
|
-
function createEditor(contentDiv, additionalPlugins, initialContent) {
|
|
15
|
-
var plugins = [new roosterjs_editor_plugins_1.HyperLink(), new roosterjs_editor_plugins_1.Paste(), new roosterjs_editor_plugins_1.ContentEdit()];
|
|
16
|
-
if (additionalPlugins) {
|
|
17
|
-
plugins = plugins.concat(additionalPlugins);
|
|
18
|
-
}
|
|
19
|
-
var options = {
|
|
20
|
-
plugins: plugins,
|
|
21
|
-
initialContent: initialContent,
|
|
22
|
-
getDarkColor: roosterjs_color_utils_1.getDarkColor,
|
|
23
|
-
defaultFormat: {
|
|
24
|
-
fontFamily: 'Calibri,Arial,Helvetica,sans-serif',
|
|
25
|
-
fontSize: '11pt',
|
|
26
|
-
textColor: '#000000',
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
return new roosterjs_editor_core_1.Editor(contentDiv, options);
|
|
30
|
-
}
|
|
31
|
-
exports.default = createEditor;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var roosterjs_editor_core_1 = require("roosterjs-editor-core");
|
|
4
|
+
var roosterjs_color_utils_1 = require("roosterjs-color-utils");
|
|
5
|
+
var roosterjs_editor_plugins_1 = require("roosterjs-editor-plugins");
|
|
6
|
+
/**
|
|
7
|
+
* Create an editor instance with most common options
|
|
8
|
+
* @param contentDiv The html div element needed for creating the editor
|
|
9
|
+
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
10
|
+
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
11
|
+
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
12
|
+
* @returns The editor instance
|
|
13
|
+
*/
|
|
14
|
+
function createEditor(contentDiv, additionalPlugins, initialContent) {
|
|
15
|
+
var plugins = [new roosterjs_editor_plugins_1.HyperLink(), new roosterjs_editor_plugins_1.Paste(), new roosterjs_editor_plugins_1.ContentEdit()];
|
|
16
|
+
if (additionalPlugins) {
|
|
17
|
+
plugins = plugins.concat(additionalPlugins);
|
|
18
|
+
}
|
|
19
|
+
var options = {
|
|
20
|
+
plugins: plugins,
|
|
21
|
+
initialContent: initialContent,
|
|
22
|
+
getDarkColor: roosterjs_color_utils_1.getDarkColor,
|
|
23
|
+
defaultFormat: {
|
|
24
|
+
fontFamily: 'Calibri,Arial,Helvetica,sans-serif',
|
|
25
|
+
fontSize: '11pt',
|
|
26
|
+
textColor: '#000000',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
return new roosterjs_editor_core_1.Editor(contentDiv, options);
|
|
30
|
+
}
|
|
31
|
+
exports.default = createEditor;
|
|
32
32
|
//# sourceMappingURL=createEditor.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as createEditor } from './createEditor';
|
|
2
|
-
export * from 'roosterjs-editor-types';
|
|
3
|
-
export * from 'roosterjs-editor-dom';
|
|
4
|
-
export * from 'roosterjs-editor-core';
|
|
5
|
-
export * from 'roosterjs-editor-api';
|
|
6
|
-
export * from 'roosterjs-editor-plugins';
|
|
7
|
-
export * from 'roosterjs-color-utils';
|
|
1
|
+
export { default as createEditor } from './createEditor';
|
|
2
|
+
export * from 'roosterjs-editor-types';
|
|
3
|
+
export * from 'roosterjs-editor-dom';
|
|
4
|
+
export * from 'roosterjs-editor-core';
|
|
5
|
+
export * from 'roosterjs-editor-api';
|
|
6
|
+
export * from 'roosterjs-editor-plugins';
|
|
7
|
+
export * from 'roosterjs-color-utils';
|
package/lib/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createEditor = void 0;
|
|
14
|
-
var createEditor_1 = require("./createEditor");
|
|
15
|
-
Object.defineProperty(exports, "createEditor", { enumerable: true, get: function () { return createEditor_1.default; } });
|
|
16
|
-
__exportStar(require("roosterjs-editor-types"), exports);
|
|
17
|
-
__exportStar(require("roosterjs-editor-dom"), exports);
|
|
18
|
-
__exportStar(require("roosterjs-editor-core"), exports);
|
|
19
|
-
__exportStar(require("roosterjs-editor-api"), exports);
|
|
20
|
-
__exportStar(require("roosterjs-editor-plugins"), exports);
|
|
21
|
-
__exportStar(require("roosterjs-color-utils"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.createEditor = void 0;
|
|
14
|
+
var createEditor_1 = require("./createEditor");
|
|
15
|
+
Object.defineProperty(exports, "createEditor", { enumerable: true, get: function () { return createEditor_1.default; } });
|
|
16
|
+
__exportStar(require("roosterjs-editor-types"), exports);
|
|
17
|
+
__exportStar(require("roosterjs-editor-dom"), exports);
|
|
18
|
+
__exportStar(require("roosterjs-editor-core"), exports);
|
|
19
|
+
__exportStar(require("roosterjs-editor-api"), exports);
|
|
20
|
+
__exportStar(require("roosterjs-editor-plugins"), exports);
|
|
21
|
+
__exportStar(require("roosterjs-color-utils"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { EditorPlugin, IEditor } from 'roosterjs-editor-types';
|
|
2
|
-
/**
|
|
3
|
-
* Create an editor instance with most common options
|
|
4
|
-
* @param contentDiv The html div element needed for creating the editor
|
|
5
|
-
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
6
|
-
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
7
|
-
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
8
|
-
* @returns The editor instance
|
|
9
|
-
*/
|
|
10
|
-
export default function createEditor(contentDiv: HTMLDivElement, additionalPlugins?: EditorPlugin[], initialContent?: string): IEditor;
|
|
1
|
+
import { EditorPlugin, IEditor } from 'roosterjs-editor-types';
|
|
2
|
+
/**
|
|
3
|
+
* Create an editor instance with most common options
|
|
4
|
+
* @param contentDiv The html div element needed for creating the editor
|
|
5
|
+
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
6
|
+
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
7
|
+
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
8
|
+
* @returns The editor instance
|
|
9
|
+
*/
|
|
10
|
+
export default function createEditor(contentDiv: HTMLDivElement, additionalPlugins?: EditorPlugin[], initialContent?: string): IEditor;
|
package/lib-amd/createEditor.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
define(["require", "exports", "roosterjs-editor-core", "roosterjs-color-utils", "roosterjs-editor-plugins"], function (require, exports, roosterjs_editor_core_1, roosterjs_color_utils_1, roosterjs_editor_plugins_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Create an editor instance with most common options
|
|
6
|
-
* @param contentDiv The html div element needed for creating the editor
|
|
7
|
-
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
8
|
-
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
9
|
-
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
10
|
-
* @returns The editor instance
|
|
11
|
-
*/
|
|
12
|
-
function createEditor(contentDiv, additionalPlugins, initialContent) {
|
|
13
|
-
var plugins = [new roosterjs_editor_plugins_1.HyperLink(), new roosterjs_editor_plugins_1.Paste(), new roosterjs_editor_plugins_1.ContentEdit()];
|
|
14
|
-
if (additionalPlugins) {
|
|
15
|
-
plugins = plugins.concat(additionalPlugins);
|
|
16
|
-
}
|
|
17
|
-
var options = {
|
|
18
|
-
plugins: plugins,
|
|
19
|
-
initialContent: initialContent,
|
|
20
|
-
getDarkColor: roosterjs_color_utils_1.getDarkColor,
|
|
21
|
-
defaultFormat: {
|
|
22
|
-
fontFamily: 'Calibri,Arial,Helvetica,sans-serif',
|
|
23
|
-
fontSize: '11pt',
|
|
24
|
-
textColor: '#000000',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
return new roosterjs_editor_core_1.Editor(contentDiv, options);
|
|
28
|
-
}
|
|
29
|
-
exports.default = createEditor;
|
|
30
|
-
});
|
|
1
|
+
define(["require", "exports", "roosterjs-editor-core", "roosterjs-color-utils", "roosterjs-editor-plugins"], function (require, exports, roosterjs_editor_core_1, roosterjs_color_utils_1, roosterjs_editor_plugins_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Create an editor instance with most common options
|
|
6
|
+
* @param contentDiv The html div element needed for creating the editor
|
|
7
|
+
* @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are
|
|
8
|
+
* ContentEdit, HyperLink and Paste, user don't need to add those.
|
|
9
|
+
* @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.
|
|
10
|
+
* @returns The editor instance
|
|
11
|
+
*/
|
|
12
|
+
function createEditor(contentDiv, additionalPlugins, initialContent) {
|
|
13
|
+
var plugins = [new roosterjs_editor_plugins_1.HyperLink(), new roosterjs_editor_plugins_1.Paste(), new roosterjs_editor_plugins_1.ContentEdit()];
|
|
14
|
+
if (additionalPlugins) {
|
|
15
|
+
plugins = plugins.concat(additionalPlugins);
|
|
16
|
+
}
|
|
17
|
+
var options = {
|
|
18
|
+
plugins: plugins,
|
|
19
|
+
initialContent: initialContent,
|
|
20
|
+
getDarkColor: roosterjs_color_utils_1.getDarkColor,
|
|
21
|
+
defaultFormat: {
|
|
22
|
+
fontFamily: 'Calibri,Arial,Helvetica,sans-serif',
|
|
23
|
+
fontSize: '11pt',
|
|
24
|
+
textColor: '#000000',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
return new roosterjs_editor_core_1.Editor(contentDiv, options);
|
|
28
|
+
}
|
|
29
|
+
exports.default = createEditor;
|
|
30
|
+
});
|
|
31
31
|
//# sourceMappingURL=createEditor.js.map
|
package/lib-amd/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as createEditor } from './createEditor';
|
|
2
|
-
export * from 'roosterjs-editor-types';
|
|
3
|
-
export * from 'roosterjs-editor-dom';
|
|
4
|
-
export * from 'roosterjs-editor-core';
|
|
5
|
-
export * from 'roosterjs-editor-api';
|
|
6
|
-
export * from 'roosterjs-editor-plugins';
|
|
7
|
-
export * from 'roosterjs-color-utils';
|
|
1
|
+
export { default as createEditor } from './createEditor';
|
|
2
|
+
export * from 'roosterjs-editor-types';
|
|
3
|
+
export * from 'roosterjs-editor-dom';
|
|
4
|
+
export * from 'roosterjs-editor-core';
|
|
5
|
+
export * from 'roosterjs-editor-api';
|
|
6
|
+
export * from 'roosterjs-editor-plugins';
|
|
7
|
+
export * from 'roosterjs-color-utils';
|
package/lib-amd/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4
|
-
}) : (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
o[k2] = m[k];
|
|
7
|
-
}));
|
|
8
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
9
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
10
|
-
};
|
|
11
|
-
define(["require", "exports", "./createEditor", "roosterjs-editor-types", "roosterjs-editor-dom", "roosterjs-editor-core", "roosterjs-editor-api", "roosterjs-editor-plugins", "roosterjs-color-utils"], function (require, exports, createEditor_1, roosterjs_editor_types_1, roosterjs_editor_dom_1, roosterjs_editor_core_1, roosterjs_editor_api_1, roosterjs_editor_plugins_1, roosterjs_color_utils_1) {
|
|
12
|
-
"use strict";
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.createEditor = void 0;
|
|
15
|
-
Object.defineProperty(exports, "createEditor", { enumerable: true, get: function () { return createEditor_1.default; } });
|
|
16
|
-
__exportStar(roosterjs_editor_types_1, exports);
|
|
17
|
-
__exportStar(roosterjs_editor_dom_1, exports);
|
|
18
|
-
__exportStar(roosterjs_editor_core_1, exports);
|
|
19
|
-
__exportStar(roosterjs_editor_api_1, exports);
|
|
20
|
-
__exportStar(roosterjs_editor_plugins_1, exports);
|
|
21
|
-
__exportStar(roosterjs_color_utils_1, exports);
|
|
22
|
-
});
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4
|
+
}) : (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
o[k2] = m[k];
|
|
7
|
+
}));
|
|
8
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
9
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
10
|
+
};
|
|
11
|
+
define(["require", "exports", "./createEditor", "roosterjs-editor-types", "roosterjs-editor-dom", "roosterjs-editor-core", "roosterjs-editor-api", "roosterjs-editor-plugins", "roosterjs-color-utils"], function (require, exports, createEditor_1, roosterjs_editor_types_1, roosterjs_editor_dom_1, roosterjs_editor_core_1, roosterjs_editor_api_1, roosterjs_editor_plugins_1, roosterjs_color_utils_1) {
|
|
12
|
+
"use strict";
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.createEditor = void 0;
|
|
15
|
+
Object.defineProperty(exports, "createEditor", { enumerable: true, get: function () { return createEditor_1.default; } });
|
|
16
|
+
__exportStar(roosterjs_editor_types_1, exports);
|
|
17
|
+
__exportStar(roosterjs_editor_dom_1, exports);
|
|
18
|
+
__exportStar(roosterjs_editor_core_1, exports);
|
|
19
|
+
__exportStar(roosterjs_editor_api_1, exports);
|
|
20
|
+
__exportStar(roosterjs_editor_plugins_1, exports);
|
|
21
|
+
__exportStar(roosterjs_color_utils_1, exports);
|
|
22
|
+
});
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -2,31 +2,19 @@
|
|
|
2
2
|
"name": "roosterjs",
|
|
3
3
|
"description": "A simple facade for all roosterjs code",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"roosterjs-editor-types": "8.21.
|
|
6
|
-
"roosterjs-editor-dom": "8.21.
|
|
7
|
-
"roosterjs-editor-core": "8.21.
|
|
8
|
-
"roosterjs-editor-api": "8.21.
|
|
9
|
-
"roosterjs-editor-plugins": "8.21.
|
|
5
|
+
"roosterjs-editor-types": "8.21.1-dev.2",
|
|
6
|
+
"roosterjs-editor-dom": "8.21.1-dev.2",
|
|
7
|
+
"roosterjs-editor-core": "8.21.1-dev.2",
|
|
8
|
+
"roosterjs-editor-api": "8.21.1-dev.2",
|
|
9
|
+
"roosterjs-editor-plugins": "8.21.1-dev.2",
|
|
10
10
|
"roosterjs-color-utils": "1.0.1"
|
|
11
11
|
},
|
|
12
12
|
"main": "./lib/index.js",
|
|
13
|
-
"version": "8.21.
|
|
13
|
+
"version": "8.21.1-dev.2",
|
|
14
14
|
"typings": "./lib/index.d.ts",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/Microsoft/roosterjs"
|
|
19
|
-
},
|
|
20
|
-
"exports": {
|
|
21
|
-
".": {
|
|
22
|
-
"roosterConstEnum": [
|
|
23
|
-
"./lib-const-enum/index.ts",
|
|
24
|
-
"./lib-const-enum/index.js"
|
|
25
|
-
],
|
|
26
|
-
"default": [
|
|
27
|
-
"./lib/index.ts",
|
|
28
|
-
"./lib/index.js"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
19
|
}
|
|
32
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/test/createEditorTest.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
define(["require", "exports", "../lib/index"], function (require, exports, roosterjs) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
// Include from root to make sure all files are included and covered by code coverage tool
|
|
5
|
-
describe('createEditor', function () {
|
|
6
|
-
it('Create editor with null inpout', function () {
|
|
7
|
-
expect(function () {
|
|
8
|
-
roosterjs.createEditor(null);
|
|
9
|
-
}).toThrow();
|
|
10
|
-
});
|
|
11
|
-
it('Create editor with non-DIV inpout', function () {
|
|
12
|
-
expect(function () {
|
|
13
|
-
var span = document.createElement('span');
|
|
14
|
-
roosterjs.createEditor(span);
|
|
15
|
-
}).toThrow();
|
|
16
|
-
});
|
|
17
|
-
it('Create an editor', function () {
|
|
18
|
-
var div = document.createElement('div');
|
|
19
|
-
var editor = roosterjs.createEditor(div);
|
|
20
|
-
expect(editor).not.toBeNull();
|
|
21
|
-
});
|
|
22
|
-
it('Create an editor with additional plugins', function () {
|
|
23
|
-
var div = document.createElement('div');
|
|
24
|
-
var initialize = jasmine.createSpy('initialize');
|
|
25
|
-
var dispose = jasmine.createSpy('dispose');
|
|
26
|
-
var onPluginEvent = jasmine.createSpy('onPluginEvent');
|
|
27
|
-
var editor = roosterjs.createEditor(div, [
|
|
28
|
-
{
|
|
29
|
-
getName: function () { return 'test'; },
|
|
30
|
-
initialize: initialize,
|
|
31
|
-
dispose: dispose,
|
|
32
|
-
onPluginEvent: onPluginEvent,
|
|
33
|
-
},
|
|
34
|
-
]);
|
|
35
|
-
expect(editor).not.toBeNull();
|
|
36
|
-
expect(initialize).toHaveBeenCalledWith(editor);
|
|
37
|
-
expect(dispose).not.toHaveBeenCalled();
|
|
38
|
-
expect(onPluginEvent).toHaveBeenCalledWith({
|
|
39
|
-
eventType:
|
|
40
|
-
});
|
|
41
|
-
editor.dispose();
|
|
42
|
-
expect(dispose).toHaveBeenCalled();
|
|
43
|
-
expect(onPluginEvent).toHaveBeenCalledWith({
|
|
44
|
-
eventType:
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
it('Create an editor with initial content', function () {
|
|
48
|
-
var div = document.createElement('div');
|
|
49
|
-
var initContent = '<b>this is a test</b>';
|
|
50
|
-
var editor = roosterjs.createEditor(div, [], initContent);
|
|
51
|
-
expect(editor).not.toBeNull();
|
|
52
|
-
expect(div.innerHTML).toBe('<div><b>this is a test</b></div>');
|
|
53
|
-
editor.dispose();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
});
|
|
1
|
+
define(["require", "exports", "../lib/index"], function (require, exports, roosterjs) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
// Include from root to make sure all files are included and covered by code coverage tool
|
|
5
|
+
describe('createEditor', function () {
|
|
6
|
+
it('Create editor with null inpout', function () {
|
|
7
|
+
expect(function () {
|
|
8
|
+
roosterjs.createEditor(null);
|
|
9
|
+
}).toThrow();
|
|
10
|
+
});
|
|
11
|
+
it('Create editor with non-DIV inpout', function () {
|
|
12
|
+
expect(function () {
|
|
13
|
+
var span = document.createElement('span');
|
|
14
|
+
roosterjs.createEditor(span);
|
|
15
|
+
}).toThrow();
|
|
16
|
+
});
|
|
17
|
+
it('Create an editor', function () {
|
|
18
|
+
var div = document.createElement('div');
|
|
19
|
+
var editor = roosterjs.createEditor(div);
|
|
20
|
+
expect(editor).not.toBeNull();
|
|
21
|
+
});
|
|
22
|
+
it('Create an editor with additional plugins', function () {
|
|
23
|
+
var div = document.createElement('div');
|
|
24
|
+
var initialize = jasmine.createSpy('initialize');
|
|
25
|
+
var dispose = jasmine.createSpy('dispose');
|
|
26
|
+
var onPluginEvent = jasmine.createSpy('onPluginEvent');
|
|
27
|
+
var editor = roosterjs.createEditor(div, [
|
|
28
|
+
{
|
|
29
|
+
getName: function () { return 'test'; },
|
|
30
|
+
initialize: initialize,
|
|
31
|
+
dispose: dispose,
|
|
32
|
+
onPluginEvent: onPluginEvent,
|
|
33
|
+
},
|
|
34
|
+
]);
|
|
35
|
+
expect(editor).not.toBeNull();
|
|
36
|
+
expect(initialize).toHaveBeenCalledWith(editor);
|
|
37
|
+
expect(dispose).not.toHaveBeenCalled();
|
|
38
|
+
expect(onPluginEvent).toHaveBeenCalledWith({
|
|
39
|
+
eventType: 11 /* EditorReady */,
|
|
40
|
+
});
|
|
41
|
+
editor.dispose();
|
|
42
|
+
expect(dispose).toHaveBeenCalled();
|
|
43
|
+
expect(onPluginEvent).toHaveBeenCalledWith({
|
|
44
|
+
eventType: 12 /* BeforeDispose */,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it('Create an editor with initial content', function () {
|
|
48
|
+
var div = document.createElement('div');
|
|
49
|
+
var initContent = '<b>this is a test</b>';
|
|
50
|
+
var editor = roosterjs.createEditor(div, [], initContent);
|
|
51
|
+
expect(editor).not.toBeNull();
|
|
52
|
+
expect(div.innerHTML).toBe('<div><b>this is a test</b></div>');
|
|
53
|
+
editor.dispose();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
57
|
//# sourceMappingURL=createEditorTest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEditorTest.js","sourceRoot":"","sources":["../../../packages/roosterjs/test/createEditorTest.ts"],"names":[],"mappings":";;;IACA,0FAA0F;IAE1F,QAAQ,CAAC,cAAc,EAAE;QACrB,EAAE,CAAC,gCAAgC,EAAE;YACjC,MAAM,CAAC;gBACH,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mCAAmC,EAAE;YACpC,MAAM,CAAC;gBACH,IAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;gBAC5C,SAAS,CAAC,YAAY,CAAC,IAAW,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,kBAAkB,EAAE;YACnB,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC1C,IAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0CAA0C,EAAE;YAC3C,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC1C,IAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACnD,IAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YAC7C,IAAM,aAAa,GAAG,OAAO,CAA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