@lingxiteam/lcdp-ueditor-react 1.0.2 → 1.0.3-alpha.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/es/LcdpUeditor.d.ts.map +1 -1
- package/es/LcdpUeditor.js +2 -1
- package/es/tools/UeditorResourceLoader.d.ts +1 -1
- package/es/tools/UeditorResourceLoader.d.ts.map +1 -1
- package/es/tools/UeditorResourceLoader.js +18 -7
- package/es/tools/filterHtmlNode.d.ts.map +1 -1
- package/es/tools/filterHtmlNode.js +7 -2
- package/lib/LcdpUeditor.js +1 -3
- package/lib/tools/UeditorResourceLoader.d.ts +1 -1
- package/lib/tools/UeditorResourceLoader.js +15 -7
- package/lib/tools/filterHtmlNode.js +8 -4
- package/package.json +1 -1
- package/ueditor-resource/dialogs/anchor/anchor.html +1 -1
- package/ueditor-resource/dialogs/attachment/attachment.css +2 -715
- package/ueditor-resource/dialogs/attachment/attachment.html +6 -6
- package/ueditor-resource/dialogs/attachment/attachment.js +2 -803
- package/ueditor-resource/dialogs/audio/audio.css +2 -878
- package/ueditor-resource/dialogs/audio/audio.js +2 -815
- package/ueditor-resource/dialogs/background/background.css +2 -192
- package/ueditor-resource/dialogs/background/background.html +3 -3
- package/ueditor-resource/dialogs/background/background.js +2 -370
- package/ueditor-resource/dialogs/contentimport/contentimport.html +3 -3
- package/ueditor-resource/dialogs/contentimport/contentimport.js +2 -91
- package/ueditor-resource/dialogs/emotion/emotion.css +2 -128
- package/ueditor-resource/dialogs/emotion/emotion.html +3 -3
- package/ueditor-resource/dialogs/emotion/emotion.js +2 -186
- package/ueditor-resource/dialogs/formula/formula.html +4 -4
- package/ueditor-resource/dialogs/formula/formula.js +2 -147
- package/ueditor-resource/dialogs/help/help.css +2 -36
- package/ueditor-resource/dialogs/help/help.html +3 -3
- package/ueditor-resource/dialogs/help/help.js +2 -57
- package/ueditor-resource/dialogs/image/image.css +2 -767
- package/ueditor-resource/dialogs/image/image.js +2 -1060
- package/ueditor-resource/dialogs/insertframe/insertframe.html +2 -2
- package/ueditor-resource/dialogs/internal.js +2 -81
- package/ueditor-resource/dialogs/preview/preview.html +2 -2
- package/ueditor-resource/dialogs/scrawl/scrawl.css +2 -323
- package/ueditor-resource/dialogs/scrawl/scrawl.html +3 -3
- package/ueditor-resource/dialogs/scrawl/scrawl.js +2 -682
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +2 -2
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +2 -174
- package/ueditor-resource/dialogs/spechars/spechars.html +2 -2
- package/ueditor-resource/dialogs/spechars/spechars.js +2 -86
- package/ueditor-resource/dialogs/table/edittable.css +2 -84
- package/ueditor-resource/dialogs/table/edittable.html +3 -3
- package/ueditor-resource/dialogs/table/edittable.js +2 -241
- package/ueditor-resource/dialogs/table/edittd.html +1 -1
- package/ueditor-resource/dialogs/table/edittip.html +1 -1
- package/ueditor-resource/dialogs/template/config.js +2 -42
- package/ueditor-resource/dialogs/template/template.css +2 -98
- package/ueditor-resource/dialogs/template/template.html +4 -4
- package/ueditor-resource/dialogs/template/template.js +2 -53
- package/ueditor-resource/dialogs/video/video.css +2 -908
- package/ueditor-resource/dialogs/video/video.js +2 -867
- package/ueditor-resource/dialogs/wordimage/wordimage.html +5 -5
- package/ueditor-resource/dialogs/wordimage/wordimage.js +2 -93
- package/ueditor-resource/lang/en/en.js +2 -686
- package/ueditor-resource/lang/zh-cn/zh-cn.js +2 -748
- package/ueditor-resource/lang/zh-tw/zh-tw.js +2 -748
- package/ueditor-resource/plugins/demo/demo.js +1 -3
- package/ueditor-resource/themes/default/css/ueditor.css +2 -2148
- package/ueditor-resource/themes/default/dialog.css +2 -16
- package/ueditor-resource/themes/default/dialogbase.css +2 -131
- package/ueditor-resource/themes/iframe.css +2 -62
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +4 -3655
- package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +3 -1
- package/ueditor-resource/third-party/clipboard/clipboard.js +2 -753
- package/ueditor-resource/third-party/codemirror/codemirror.css +2 -105
- package/ueditor-resource/third-party/codemirror/codemirror.js +3 -3581
- package/ueditor-resource/third-party/jquery-3.5.1.js +4 -2
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +4 -4314
- package/ueditor-resource/third-party/webuploader/webuploader.css +2 -87
- package/ueditor-resource/third-party/webuploader/webuploader.js +5 -4
- package/ueditor-resource/ueditor.all.js +20 -32644
- package/ueditor-resource/ueditor.config.js +2 -655
- package/ueditor-resource/ueditor.parse.js +2 -639
package/es/LcdpUeditor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LcdpUeditor.d.ts","sourceRoot":"","sources":["LcdpUeditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQhD,cAAM,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAC9D;;OAEG;IACH,WAAW,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAwD;IAExE;;OAEG;IACH,OAAO,CAAC,YAAY,CAAwD;IAE5E;;OAEG;IACH,OAAO,CAAC,WAAW,CAAS;IAE5B;;OAEG;IACH,OAAO,CAAC,WAAW,CAAa;IAEhC;;OAEG;IACH,OAAO,CAAC,YAAY,CAAiB;IAErC;;OAEG;IACH,OAAO,CAAC,qBAAqB,CAAW;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAc;IAEpC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAM;IAE5B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAkB;IAEjC;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"LcdpUeditor.d.ts","sourceRoot":"","sources":["LcdpUeditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQhD,cAAM,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAC9D;;OAEG;IACH,WAAW,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAwD;IAExE;;OAEG;IACH,OAAO,CAAC,YAAY,CAAwD;IAE5E;;OAEG;IACH,OAAO,CAAC,WAAW,CAAS;IAE5B;;OAEG;IACH,OAAO,CAAC,WAAW,CAAa;IAEhC;;OAEG;IACH,OAAO,CAAC,YAAY,CAAiB;IAErC;;OAEG;IACH,OAAO,CAAC,qBAAqB,CAAW;IAExC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAc;IAEpC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAM;IAE5B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAkB;IAEjC;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAErC;IAEF;;OAEG;IACH,YAAY,EAAE,GAAG,CAAM;gBAEX,KAAK,EAAE,iBAAiB;IA4CpC,iBAAiB,IAAI,IAAI;IAIzB,yBAAyB,CAAC,SAAS,EAAE,iBAAiB;IAiBtD,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,UAAU;IAWlB;;;;OAIG;YACW,UAAU;IAqCxB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAMhB;;OAEG;IACH,OAAO,CAAC,SAAS;IAcjB;;OAEG;IACG,WAAW;IAgCjB,MAAM,IAAI,KAAK,CAAC,SAAS;CAY1B;AAED,eAAe,WAAW,CAAC"}
|
package/es/LcdpUeditor.js
CHANGED
|
@@ -324,7 +324,8 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
324
324
|
});
|
|
325
325
|
_this3.mountRef();
|
|
326
326
|
});
|
|
327
|
-
|
|
327
|
+
// 默认配置 语言包 统一打包到 ueditor-all.js中
|
|
328
|
+
jsList = ["".concat(this.ueditorPath, "/").concat(DEFAULT_UEDITOR_CONFIG.UEDITOR_ALL)];
|
|
328
329
|
UeditorResourceLoader.onLoadError(function () {
|
|
329
330
|
_this3.setState({
|
|
330
331
|
initError: true
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare class UeditorResourceLoader {
|
|
2
2
|
private static instance;
|
|
3
|
+
private static ueditorIsLoad;
|
|
3
4
|
private callbackList;
|
|
4
5
|
private errorCallbackList;
|
|
5
6
|
private isReady;
|
|
6
|
-
private loading;
|
|
7
7
|
private initError;
|
|
8
8
|
static startLoad(jsList: string[]): Promise<void>;
|
|
9
9
|
static getInstance(): UeditorResourceLoader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UeditorResourceLoader.d.ts","sourceRoot":"","sources":["UeditorResourceLoader.ts"],"names":[],"mappings":"AAGA,cAAM,qBAAqB;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAwB;
|
|
1
|
+
{"version":3,"file":"UeditorResourceLoader.d.ts","sourceRoot":"","sources":["UeditorResourceLoader.ts"],"names":[],"mappings":"AAGA,cAAM,qBAAqB;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAwB;IAG/C,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,YAAY,CAAkB;IAEtC,OAAO,CAAC,iBAAiB,CAAkB;IAE3C,OAAO,CAAC,OAAO,CAAkB;IAEjC,OAAO,CAAC,SAAS,CAAkB;WAEf,SAAS,CAAE,MAAM,EAAE,MAAM,EAAE;WAgCjC,WAAW;IAWzB;;;OAGG;WACW,OAAO,CAAC,QAAQ,EAAE,QAAQ;IASxC;;;OAGG;WACW,WAAW,CAAC,QAAQ,EAAE,QAAQ;CAI7C;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -10,10 +10,17 @@ var UeditorResourceLoader = /*#__PURE__*/function () {
|
|
|
10
10
|
_defineProperty(this, "callbackList", []);
|
|
11
11
|
_defineProperty(this, "errorCallbackList", []);
|
|
12
12
|
_defineProperty(this, "isReady", false);
|
|
13
|
-
_defineProperty(this, "loading", false);
|
|
14
13
|
_defineProperty(this, "initError", false);
|
|
15
14
|
}
|
|
16
15
|
_createClass(UeditorResourceLoader, null, [{
|
|
16
|
+
key: "ueditorIsLoad",
|
|
17
|
+
value:
|
|
18
|
+
// 编辑器已经加载
|
|
19
|
+
function ueditorIsLoad() {
|
|
20
|
+
var _window;
|
|
21
|
+
return !!((_window = window) !== null && _window !== void 0 && (_window = _window.UE) !== null && _window !== void 0 && _window.getEditor);
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
17
24
|
key: "startLoad",
|
|
18
25
|
value: function () {
|
|
19
26
|
var _startLoad = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(jsList) {
|
|
@@ -22,19 +29,19 @@ var UeditorResourceLoader = /*#__PURE__*/function () {
|
|
|
22
29
|
while (1) switch (_context.prev = _context.next) {
|
|
23
30
|
case 0:
|
|
24
31
|
inst = this.getInstance();
|
|
25
|
-
if (!(!
|
|
32
|
+
if (!(!window.loadingUE && !inst.isReady || inst.initError)) {
|
|
26
33
|
_context.next = 14;
|
|
27
34
|
break;
|
|
28
35
|
}
|
|
29
|
-
|
|
36
|
+
window.loadingUE = true;
|
|
30
37
|
inst.initError = false;
|
|
31
38
|
_context.prev = 4;
|
|
32
39
|
_context.next = 7;
|
|
33
40
|
return loadScriptSync(jsList);
|
|
34
41
|
case 7:
|
|
35
|
-
if (
|
|
42
|
+
if (UeditorResourceLoader.ueditorIsLoad()) {
|
|
36
43
|
inst.isReady = true;
|
|
37
|
-
|
|
44
|
+
window.loadingUE = false;
|
|
38
45
|
|
|
39
46
|
// 执行callback中的回调函数
|
|
40
47
|
while (inst.callbackList.length) {
|
|
@@ -42,7 +49,7 @@ var UeditorResourceLoader = /*#__PURE__*/function () {
|
|
|
42
49
|
cb && cb();
|
|
43
50
|
}
|
|
44
51
|
} else {
|
|
45
|
-
|
|
52
|
+
window.loadingUE = false;
|
|
46
53
|
inst.isReady = false;
|
|
47
54
|
inst.initError = true;
|
|
48
55
|
while (inst.errorCallbackList.length) {
|
|
@@ -55,7 +62,7 @@ var UeditorResourceLoader = /*#__PURE__*/function () {
|
|
|
55
62
|
case 10:
|
|
56
63
|
_context.prev = 10;
|
|
57
64
|
_context.t0 = _context["catch"](4);
|
|
58
|
-
|
|
65
|
+
window.loadingUE = false;
|
|
59
66
|
inst.isReady = false;
|
|
60
67
|
case 14:
|
|
61
68
|
case "end":
|
|
@@ -74,6 +81,10 @@ var UeditorResourceLoader = /*#__PURE__*/function () {
|
|
|
74
81
|
if (!this.instance) {
|
|
75
82
|
this.instance = new UeditorResourceLoader();
|
|
76
83
|
}
|
|
84
|
+
if (UeditorResourceLoader.ueditorIsLoad()) {
|
|
85
|
+
this.instance.isReady = true;
|
|
86
|
+
window.loadingUE = false;
|
|
87
|
+
}
|
|
77
88
|
return this.instance;
|
|
78
89
|
}
|
|
79
90
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterHtmlNode.d.ts","sourceRoot":"","sources":["filterHtmlNode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAS,MAAM;;;;
|
|
1
|
+
{"version":3,"file":"filterHtmlNode.d.ts","sourceRoot":"","sources":["filterHtmlNode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAS,MAAM;;;;CA2CzC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export var filterHtmlNode = function filterHtmlNode(str) {
|
|
2
|
+
var _doc$body;
|
|
2
3
|
var flag = false;
|
|
3
4
|
if (typeof str !== 'string') return str || '';
|
|
4
5
|
var blacklist = ['script', 'style', 'iframe'];
|
|
@@ -11,6 +12,9 @@ export var filterHtmlNode = function filterHtmlNode(str) {
|
|
|
11
12
|
|
|
12
13
|
// 遍历 DOM 树并删除恶意节点
|
|
13
14
|
function cleanNode(node) {
|
|
15
|
+
if (!node) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
14
18
|
if (node.nodeType === 1) {
|
|
15
19
|
// 元素节点
|
|
16
20
|
if (blacklist.indexOf(node.nodeName.toLowerCase()) !== -1) {
|
|
@@ -28,13 +32,14 @@ export var filterHtmlNode = function filterHtmlNode(str) {
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
for (var _i = 0; _i < node.childNodes.length; _i += 1) {
|
|
35
|
+
for (var _i = 0; _i < (node === null || node === void 0 || (_node$childNodes = node.childNodes) === null || _node$childNodes === void 0 ? void 0 : _node$childNodes.length); _i += 1) {
|
|
36
|
+
var _node$childNodes;
|
|
32
37
|
cleanNode(node.childNodes[_i]);
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
cleanNode(doc.body);
|
|
36
41
|
return {
|
|
37
|
-
str: doc.body.innerHTML,
|
|
42
|
+
str: ((_doc$body = doc.body) === null || _doc$body === void 0 ? void 0 : _doc$body.innerHTML) || '',
|
|
38
43
|
flag: flag,
|
|
39
44
|
source: str
|
|
40
45
|
};
|
package/lib/LcdpUeditor.js
CHANGED
|
@@ -252,9 +252,7 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
252
252
|
this.mountRef();
|
|
253
253
|
});
|
|
254
254
|
const jsList = [
|
|
255
|
-
`${this.ueditorPath}/${import_const.DEFAULT_UEDITOR_CONFIG.
|
|
256
|
-
`${this.ueditorPath}/${import_const.DEFAULT_UEDITOR_CONFIG.UEDITOR_ALL}`,
|
|
257
|
-
`${this.ueditorPath}/${import_const.DEFAULT_UEDITOR_CONFIG.GET_UEDITOR_LANG(this.props.lang || "zh-cn")}`
|
|
255
|
+
`${this.ueditorPath}/${import_const.DEFAULT_UEDITOR_CONFIG.UEDITOR_ALL}`
|
|
258
256
|
];
|
|
259
257
|
import_UeditorResourceLoader.default.onLoadError(() => {
|
|
260
258
|
this.setState({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare class UeditorResourceLoader {
|
|
2
2
|
private static instance;
|
|
3
|
+
private static ueditorIsLoad;
|
|
3
4
|
private callbackList;
|
|
4
5
|
private errorCallbackList;
|
|
5
6
|
private isReady;
|
|
6
|
-
private loading;
|
|
7
7
|
private initError;
|
|
8
8
|
static startLoad(jsList: string[]): Promise<void>;
|
|
9
9
|
static getInstance(): UeditorResourceLoader;
|
|
@@ -28,25 +28,29 @@ var UeditorResourceLoader = class {
|
|
|
28
28
|
this.callbackList = [];
|
|
29
29
|
this.errorCallbackList = [];
|
|
30
30
|
this.isReady = false;
|
|
31
|
-
this.loading = false;
|
|
32
31
|
this.initError = false;
|
|
33
32
|
}
|
|
33
|
+
// 编辑器已经加载
|
|
34
|
+
static ueditorIsLoad() {
|
|
35
|
+
var _a;
|
|
36
|
+
return !!((_a = window == null ? void 0 : window.UE) == null ? void 0 : _a.getEditor);
|
|
37
|
+
}
|
|
34
38
|
static async startLoad(jsList) {
|
|
35
39
|
const inst = this.getInstance();
|
|
36
|
-
if (!
|
|
37
|
-
|
|
40
|
+
if (!window.loadingUE && !inst.isReady || inst.initError) {
|
|
41
|
+
window.loadingUE = true;
|
|
38
42
|
inst.initError = false;
|
|
39
43
|
try {
|
|
40
44
|
await (0, import_loadScript.loadScriptSync)(jsList);
|
|
41
|
-
if (
|
|
45
|
+
if (UeditorResourceLoader.ueditorIsLoad()) {
|
|
42
46
|
inst.isReady = true;
|
|
43
|
-
|
|
47
|
+
window.loadingUE = false;
|
|
44
48
|
while (inst.callbackList.length) {
|
|
45
49
|
const cb = inst.callbackList.pop();
|
|
46
50
|
cb && cb();
|
|
47
51
|
}
|
|
48
52
|
} else {
|
|
49
|
-
|
|
53
|
+
window.loadingUE = false;
|
|
50
54
|
inst.isReady = false;
|
|
51
55
|
inst.initError = true;
|
|
52
56
|
while (inst.errorCallbackList.length) {
|
|
@@ -55,7 +59,7 @@ var UeditorResourceLoader = class {
|
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
} catch (error) {
|
|
58
|
-
|
|
62
|
+
window.loadingUE = false;
|
|
59
63
|
inst.isReady = false;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -64,6 +68,10 @@ var UeditorResourceLoader = class {
|
|
|
64
68
|
if (!this.instance) {
|
|
65
69
|
this.instance = new UeditorResourceLoader();
|
|
66
70
|
}
|
|
71
|
+
if (UeditorResourceLoader.ueditorIsLoad()) {
|
|
72
|
+
this.instance.isReady = true;
|
|
73
|
+
window.loadingUE = false;
|
|
74
|
+
}
|
|
67
75
|
return this.instance;
|
|
68
76
|
}
|
|
69
77
|
/**
|
|
@@ -23,6 +23,7 @@ __export(filterHtmlNode_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(filterHtmlNode_exports);
|
|
25
25
|
var filterHtmlNode = (str) => {
|
|
26
|
+
var _a;
|
|
26
27
|
let flag = false;
|
|
27
28
|
if (typeof str !== "string")
|
|
28
29
|
return str || "";
|
|
@@ -30,10 +31,13 @@ var filterHtmlNode = (str) => {
|
|
|
30
31
|
const parser = new DOMParser();
|
|
31
32
|
const doc = parser.parseFromString(str, "text/html");
|
|
32
33
|
function cleanNode(node) {
|
|
33
|
-
var
|
|
34
|
+
var _a2, _b;
|
|
35
|
+
if (!node) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
34
38
|
if (node.nodeType === 1) {
|
|
35
39
|
if (blacklist.indexOf(node.nodeName.toLowerCase()) !== -1) {
|
|
36
|
-
(
|
|
40
|
+
(_a2 = node.parentNode) == null ? void 0 : _a2.removeChild(node);
|
|
37
41
|
return;
|
|
38
42
|
}
|
|
39
43
|
for (let i = node.attributes.length - 1; i >= 0; i -= 1) {
|
|
@@ -44,13 +48,13 @@ var filterHtmlNode = (str) => {
|
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
|
-
for (let i = 0; i < node.childNodes.length; i += 1) {
|
|
51
|
+
for (let i = 0; i < ((_b = node == null ? void 0 : node.childNodes) == null ? void 0 : _b.length); i += 1) {
|
|
48
52
|
cleanNode(node.childNodes[i]);
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
cleanNode(doc.body);
|
|
52
56
|
return {
|
|
53
|
-
str: doc.body.innerHTML,
|
|
57
|
+
str: ((_a = doc.body) == null ? void 0 : _a.innerHTML) || "",
|
|
54
58
|
flag,
|
|
55
59
|
source: str
|
|
56
60
|
};
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<div class="content">
|
|
38
38
|
<span><var id="lang_input_anchorName"></var></span><input id="anchorName" value=""/>
|
|
39
39
|
</div>
|
|
40
|
-
<script type="text/javascript" src="../internal.js?
|
|
40
|
+
<script type="text/javascript" src="../internal.js?04dbe7f0"></script>
|
|
41
41
|
<script type="text/javascript">
|
|
42
42
|
var anchorInput = $G('anchorName'),
|
|
43
43
|
node = editor.selection.getRange().getClosedNode();
|