@lingxiteam/lcdp-ueditor-react 1.0.3-alpha.18 → 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 +2 -12
- package/es/LcdpUeditor.d.ts.map +1 -1
- package/es/LcdpUeditor.js +16 -107
- package/es/type.d.ts +0 -21
- package/es/type.d.ts.map +1 -1
- package/lib/LcdpUeditor.d.ts +2 -12
- package/lib/LcdpUeditor.js +16 -93
- package/lib/type.d.ts +0 -21
- package/package.json +3 -8
- package/ueditor-resource/dialogs/anchor/anchor.html +1 -1
- package/ueditor-resource/dialogs/attachment/attachment.html +3 -3
- package/ueditor-resource/dialogs/attachment/attachment.js +1 -1
- package/ueditor-resource/dialogs/audio/audio.js +1 -1
- package/ueditor-resource/dialogs/background/background.html +2 -2
- package/ueditor-resource/dialogs/background/background.js +1 -1
- package/ueditor-resource/dialogs/contentimport/contentimport.html +3 -3
- package/ueditor-resource/dialogs/contentimport/contentimport.js +1 -1
- package/ueditor-resource/dialogs/emotion/emotion.html +2 -2
- package/ueditor-resource/dialogs/emotion/emotion.js +1 -1
- package/ueditor-resource/dialogs/formula/formula.html +4 -4
- package/ueditor-resource/dialogs/formula/formula.js +1 -1
- package/ueditor-resource/dialogs/help/help.html +2 -2
- package/ueditor-resource/dialogs/help/help.js +1 -1
- package/ueditor-resource/dialogs/image/image.js +1 -1
- package/ueditor-resource/dialogs/insertframe/insertframe.html +1 -1
- package/ueditor-resource/dialogs/internal.js +1 -1
- package/ueditor-resource/dialogs/preview/preview.html +2 -2
- package/ueditor-resource/dialogs/scrawl/scrawl.html +2 -2
- package/ueditor-resource/dialogs/scrawl/scrawl.js +1 -1
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +2 -2
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +1 -1
- package/ueditor-resource/dialogs/spechars/spechars.html +2 -2
- package/ueditor-resource/dialogs/spechars/spechars.js +1 -1
- package/ueditor-resource/dialogs/table/edittable.html +2 -2
- package/ueditor-resource/dialogs/table/edittable.js +1 -1
- package/ueditor-resource/dialogs/table/edittd.html +1 -1
- package/ueditor-resource/dialogs/table/edittip.html +1 -1
- package/ueditor-resource/dialogs/template/template.html +2 -2
- package/ueditor-resource/dialogs/template/template.js +1 -1
- package/ueditor-resource/dialogs/video/video.js +1 -1
- package/ueditor-resource/dialogs/wordimage/wordimage.html +4 -4
- package/ueditor-resource/dialogs/wordimage/wordimage.js +1 -1
- package/ueditor-resource/plugins/demo/demo.js +1 -3
- package/ueditor-resource/themes/default/css/ueditor.css +1 -1
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3 -3
- package/ueditor-resource/third-party/clipboard/clipboard.js +1 -1
- package/ueditor-resource/third-party/codemirror/codemirror.js +2 -3
- package/ueditor-resource/third-party/jquery-3.5.1.js +3 -3
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +3 -3
- package/ueditor-resource/ueditor.all.js +19 -22
- package/ueditor-resource/ueditor.config.js +1 -1
- package/ueditor-resource/ueditor.parse.js +1 -1
- package/es/ToolBottomBar/FormatModal/index.d.ts +0 -9
- package/es/ToolBottomBar/FormatModal/index.d.ts.map +0 -1
- package/es/ToolBottomBar/FormatModal/index.js +0 -543
- package/es/ToolBottomBar/FormatModal/index.less +0 -276
- package/es/ToolBottomBar/ProgressModal/index.d.ts +0 -10
- package/es/ToolBottomBar/ProgressModal/index.d.ts.map +0 -1
- package/es/ToolBottomBar/ProgressModal/index.js +0 -53
- package/es/ToolBottomBar/ProgressModal/index.less +0 -16
- package/es/ToolBottomBar/index.d.ts +0 -33
- package/es/ToolBottomBar/index.d.ts.map +0 -1
- package/es/ToolBottomBar/index.js +0 -296
- package/es/ToolBottomBar/index.less +0 -75
- package/es/icon/ExportPDF.d.ts +0 -3
- package/es/icon/ExportPDF.d.ts.map +0 -1
- package/es/icon/ExportPDF.js +0 -24
- package/es/icon/TextCopy.d.ts +0 -3
- package/es/icon/TextCopy.d.ts.map +0 -1
- package/es/icon/TextCopy.js +0 -25
- package/es/icon/TextFileIcon.d.ts +0 -3
- package/es/icon/TextFileIcon.d.ts.map +0 -1
- package/es/icon/TextFileIcon.js +0 -26
- package/es/icon/TextIcon.d.ts +0 -3
- package/es/icon/TextIcon.d.ts.map +0 -1
- package/es/icon/TextIcon.js +0 -28
- package/es/tools/exportPDF.d.ts +0 -27
- package/es/tools/exportPDF.d.ts.map +0 -1
- package/es/tools/exportPDF.js +0 -146
- package/es/tools/generateStylesFromSettings.d.ts +0 -38
- package/es/tools/generateStylesFromSettings.d.ts.map +0 -1
- package/es/tools/generateStylesFromSettings.js +0 -24
- package/lib/ToolBottomBar/FormatModal/index.d.ts +0 -9
- package/lib/ToolBottomBar/FormatModal/index.js +0 -261
- package/lib/ToolBottomBar/FormatModal/index.less +0 -276
- package/lib/ToolBottomBar/ProgressModal/index.d.ts +0 -10
- package/lib/ToolBottomBar/ProgressModal/index.js +0 -73
- package/lib/ToolBottomBar/ProgressModal/index.less +0 -16
- package/lib/ToolBottomBar/index.d.ts +0 -33
- package/lib/ToolBottomBar/index.js +0 -235
- package/lib/ToolBottomBar/index.less +0 -75
- package/lib/icon/ExportPDF.d.ts +0 -3
- package/lib/icon/ExportPDF.js +0 -57
- package/lib/icon/TextCopy.d.ts +0 -3
- package/lib/icon/TextCopy.js +0 -39
- package/lib/icon/TextFileIcon.d.ts +0 -3
- package/lib/icon/TextFileIcon.js +0 -39
- package/lib/icon/TextIcon.d.ts +0 -3
- package/lib/icon/TextIcon.js +0 -39
- package/lib/tools/exportPDF.d.ts +0 -27
- package/lib/tools/exportPDF.js +0 -95
- package/lib/tools/generateStylesFromSettings.d.ts +0 -38
- package/lib/tools/generateStylesFromSettings.js +0 -77
- package/ueditor-resource/plugins/browser-image-compression.js +0 -9
package/es/LcdpUeditor.d.ts
CHANGED
|
@@ -38,19 +38,14 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
38
38
|
*/
|
|
39
39
|
private uploadFunction;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* 是否加载完成
|
|
42
42
|
*/
|
|
43
|
-
private
|
|
44
|
-
/**
|
|
45
|
-
* 是否全屏
|
|
46
|
-
*/
|
|
47
|
-
private prefixCls;
|
|
43
|
+
private isReady;
|
|
48
44
|
/**
|
|
49
45
|
* 初始加载失败
|
|
50
46
|
*/
|
|
51
47
|
state: Readonly<{
|
|
52
48
|
initError: boolean;
|
|
53
|
-
isReady: boolean;
|
|
54
49
|
}>;
|
|
55
50
|
/**
|
|
56
51
|
* 编辑器配置项
|
|
@@ -59,7 +54,6 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
59
54
|
constructor(props: ILcdpUeditorProps);
|
|
60
55
|
componentDidMount(): void;
|
|
61
56
|
componentWillReceiveProps(nextProps: ILcdpUeditorProps): void;
|
|
62
|
-
componentDidUpdate(prevProps: Readonly<ILcdpUeditorProps>): void;
|
|
63
57
|
componentWillUnmount(): void;
|
|
64
58
|
private onContentChange;
|
|
65
59
|
private getExtString;
|
|
@@ -82,10 +76,6 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
82
76
|
* 初始化编辑器实例
|
|
83
77
|
*/
|
|
84
78
|
initUeditor(): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* 渲染状态栏
|
|
87
|
-
*/
|
|
88
|
-
renderStatusBar(): void;
|
|
89
79
|
render(): React.ReactNode;
|
|
90
80
|
}
|
|
91
81
|
export default LcdpUeditor;
|
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;
|
|
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
|
@@ -8,13 +8,11 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
8
8
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import ReactDOM from 'react-dom';
|
|
12
11
|
import { DEFAULT_UEDITOR_CONFIG, DEFAULT_UEDITOR_PATH } from "./const";
|
|
13
12
|
import DefaultConfig from "./defaultConfig.json";
|
|
14
13
|
import UeditorResourceLoader from "./tools/UeditorResourceLoader";
|
|
15
14
|
import debounce from 'lodash/debounce';
|
|
16
15
|
import { filterHtmlNode } from "./tools/filterHtmlNode";
|
|
17
|
-
import ToolBottomBar from "./ToolBottomBar";
|
|
18
16
|
var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
19
17
|
_inherits(LcdpUeditor, _React$Component);
|
|
20
18
|
var _super = _createSuper(LcdpUeditor);
|
|
@@ -59,30 +57,20 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
59
57
|
*/
|
|
60
58
|
_defineProperty(_assertThisInitialized(_this), "uploadFunction", void 0);
|
|
61
59
|
/**
|
|
62
|
-
*
|
|
60
|
+
* 是否加载完成
|
|
63
61
|
*/
|
|
64
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
65
|
-
/**
|
|
66
|
-
* 是否全屏
|
|
67
|
-
*/
|
|
68
|
-
_defineProperty(_assertThisInitialized(_this), "prefixCls", 'pcfactory');
|
|
62
|
+
_defineProperty(_assertThisInitialized(_this), "isReady", false);
|
|
69
63
|
/**
|
|
70
64
|
* 初始加载失败
|
|
71
65
|
*/
|
|
72
66
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
73
|
-
initError: false
|
|
74
|
-
/**
|
|
75
|
-
* 是否加载完成
|
|
76
|
-
*/
|
|
77
|
-
isReady: false
|
|
67
|
+
initError: false
|
|
78
68
|
});
|
|
79
69
|
/**
|
|
80
70
|
* 编辑器配置项
|
|
81
71
|
*/
|
|
82
72
|
_defineProperty(_assertThisInitialized(_this), "editorConfig", {});
|
|
83
|
-
var config = props.config
|
|
84
|
-
prefixCls = props.prefixCls,
|
|
85
|
-
onFormatChange = props.onFormatChange;
|
|
73
|
+
var config = props.config;
|
|
86
74
|
_this.containerId = "ueditor_".concat(Date.now(), "_").concat(String(Math.random()).slice(2, 6));
|
|
87
75
|
if (_this.props.ueditorPath) {
|
|
88
76
|
_this.ueditorPath = _this.props.ueditorPath;
|
|
@@ -110,7 +98,6 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
110
98
|
}
|
|
111
99
|
return null;
|
|
112
100
|
};
|
|
113
|
-
_this.prefixCls = prefixCls || 'pcfactory';
|
|
114
101
|
_this.editorConfig = _objectSpread(_objectSpread({}, DefaultConfig), {}, {
|
|
115
102
|
maximumWords: (config === null || config === void 0 ? void 0 : config.maximumWords) || 10000,
|
|
116
103
|
initialFrameHeight: (config === null || config === void 0 ? void 0 : config.height) || 300,
|
|
@@ -120,9 +107,7 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
120
107
|
},
|
|
121
108
|
uploadFunction: _this.uploadFunction,
|
|
122
109
|
initialContent: '',
|
|
123
|
-
pasteplain: (config === null || config === void 0 ? void 0 : config.pasteplain) === true
|
|
124
|
-
onFormatChange: onFormatChange,
|
|
125
|
-
exportFileName: (config === null || config === void 0 ? void 0 : config.exportFileName) || '未命名'
|
|
110
|
+
pasteplain: (config === null || config === void 0 ? void 0 : config.pasteplain) === true
|
|
126
111
|
});
|
|
127
112
|
_this.debounceContentChange = debounce(_this.onContentChange.bind(_assertThisInitialized(_this)), 300);
|
|
128
113
|
return _this;
|
|
@@ -135,7 +120,7 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
135
120
|
}, {
|
|
136
121
|
key: "componentWillReceiveProps",
|
|
137
122
|
value: function componentWillReceiveProps(nextProps) {
|
|
138
|
-
if (this.
|
|
123
|
+
if (this.isReady) {
|
|
139
124
|
if ('value' in nextProps && this.currentContent !== nextProps.value) {
|
|
140
125
|
this.isReportFlag = false;
|
|
141
126
|
this.ueditorInst.setContent(filterHtmlNode(nextProps.value || '').str);
|
|
@@ -150,25 +135,12 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
150
135
|
}
|
|
151
136
|
}
|
|
152
137
|
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "componentDidUpdate",
|
|
155
|
-
value: function componentDidUpdate(prevProps) {
|
|
156
|
-
if (this.state.isReady && prevProps.defaultFormatSetting !== this.props.defaultFormatSetting) {
|
|
157
|
-
this.renderStatusBar();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
138
|
}, {
|
|
161
139
|
key: "componentWillUnmount",
|
|
162
140
|
value: function componentWillUnmount() {
|
|
163
|
-
if (this.
|
|
164
|
-
var _this$ueditorInst, _this$
|
|
165
|
-
|
|
166
|
-
if (editorBody && this.compositionEndHandler) {
|
|
167
|
-
// 销毁时移除监听
|
|
168
|
-
editorBody.removeEventListener('compositionend', this.compositionEndHandler);
|
|
169
|
-
this.compositionEndHandler = undefined;
|
|
170
|
-
}
|
|
171
|
-
(_this$ueditorInst2 = this.ueditorInst) === null || _this$ueditorInst2 === void 0 || (_this$ueditorInst2$de = _this$ueditorInst2.destroy) === null || _this$ueditorInst2$de === void 0 || _this$ueditorInst2$de.call(_this$ueditorInst2);
|
|
141
|
+
if (this.isReady) {
|
|
142
|
+
var _this$ueditorInst, _this$ueditorInst$des;
|
|
143
|
+
(_this$ueditorInst = this.ueditorInst) === null || _this$ueditorInst === void 0 || (_this$ueditorInst$des = _this$ueditorInst.destroy) === null || _this$ueditorInst$des === void 0 || _this$ueditorInst$des.call(_this$ueditorInst);
|
|
172
144
|
}
|
|
173
145
|
}
|
|
174
146
|
}, {
|
|
@@ -330,33 +302,15 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
330
302
|
value: (function () {
|
|
331
303
|
var _initUeditor = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
332
304
|
var _this3 = this;
|
|
333
|
-
var
|
|
305
|
+
var jsList;
|
|
334
306
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
335
307
|
while (1) switch (_context3.prev = _context3.next) {
|
|
336
308
|
case 0:
|
|
337
|
-
|
|
338
|
-
readyFunc = function readyFunc() {
|
|
309
|
+
UeditorResourceLoader.onReady(function () {
|
|
339
310
|
_this3.initConfig();
|
|
340
|
-
var target = document.getElementById(_this3.containerId);
|
|
341
|
-
if (!window.UE || !target) {
|
|
342
|
-
timer = setInterval(function () {
|
|
343
|
-
target = document.getElementById(_this3.containerId);
|
|
344
|
-
if (target) {
|
|
345
|
-
clearInterval(timer);
|
|
346
|
-
readyFunc();
|
|
347
|
-
}
|
|
348
|
-
}, 50);
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
311
|
_this3.ueditorInst = window.UE.getEditor(_this3.containerId, _this3.editorConfig);
|
|
352
312
|
_this3.ueditorInst.ready(function () {
|
|
353
|
-
|
|
354
|
-
if (nextValue) {
|
|
355
|
-
_this3.ueditorInst.setContent(nextValue);
|
|
356
|
-
}
|
|
357
|
-
_this3.setState({
|
|
358
|
-
isReady: true
|
|
359
|
-
});
|
|
313
|
+
_this3.isReady = true;
|
|
360
314
|
// 禁用状态设置
|
|
361
315
|
if (_this3.props.disabled) {
|
|
362
316
|
_this3.ueditorInst.setDisabled();
|
|
@@ -366,21 +320,10 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
366
320
|
_this3.ueditorInst.addListener('contentChange', function () {
|
|
367
321
|
_this3.debounceContentChange();
|
|
368
322
|
});
|
|
369
|
-
|
|
370
|
-
// 处理微软拼音输入法输入中文时,内容不会触发contentChange事件
|
|
371
|
-
var editorBody = _this3.ueditorInst.body;
|
|
372
|
-
if (editorBody) {
|
|
373
|
-
_this3.compositionEndHandler = function () {
|
|
374
|
-
_this3.debounceContentChange();
|
|
375
|
-
};
|
|
376
|
-
editorBody.addEventListener('compositionend', _this3.compositionEndHandler);
|
|
377
|
-
}
|
|
378
323
|
_this3.initStyle();
|
|
379
|
-
_this3.mountRef();
|
|
380
|
-
_this3.renderStatusBar();
|
|
381
324
|
});
|
|
382
|
-
|
|
383
|
-
|
|
325
|
+
_this3.mountRef();
|
|
326
|
+
});
|
|
384
327
|
// 默认配置 语言包 统一打包到 ueditor-all.js中
|
|
385
328
|
jsList = ["".concat(this.ueditorPath, "/").concat(DEFAULT_UEDITOR_CONFIG.UEDITOR_ALL)];
|
|
386
329
|
UeditorResourceLoader.onLoadError(function () {
|
|
@@ -389,7 +332,7 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
389
332
|
});
|
|
390
333
|
});
|
|
391
334
|
UeditorResourceLoader.startLoad(jsList);
|
|
392
|
-
case
|
|
335
|
+
case 4:
|
|
393
336
|
case "end":
|
|
394
337
|
return _context3.stop();
|
|
395
338
|
}
|
|
@@ -399,41 +342,7 @@ var LcdpUeditor = /*#__PURE__*/function (_React$Component) {
|
|
|
399
342
|
return _initUeditor.apply(this, arguments);
|
|
400
343
|
}
|
|
401
344
|
return initUeditor;
|
|
402
|
-
}()
|
|
403
|
-
/**
|
|
404
|
-
* 渲染状态栏
|
|
405
|
-
*/
|
|
406
|
-
)
|
|
407
|
-
}, {
|
|
408
|
-
key: "renderStatusBar",
|
|
409
|
-
value: function renderStatusBar() {
|
|
410
|
-
var _this$containerRef$cu, _this$props, _this$props$bottomTyp;
|
|
411
|
-
var _ref4 = this.ueditorInst.ui || {},
|
|
412
|
-
id = _ref4.id;
|
|
413
|
-
var bottomBarContainer = (_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 ? void 0 : _this$containerRef$cu.querySelector("#".concat(id, "_bottombar"));
|
|
414
|
-
var comp = /*#__PURE__*/React.createElement(ToolBottomBar, {
|
|
415
|
-
ueditorInst: this.ueditorInst,
|
|
416
|
-
prefixCls: this.prefixCls,
|
|
417
|
-
containerRef: this.containerRef,
|
|
418
|
-
defaultFormatSetting: this.props.defaultFormatSetting,
|
|
419
|
-
onFormatChange: this.editorConfig.onFormatChange,
|
|
420
|
-
isReady: this.state.isReady,
|
|
421
|
-
bottomTypes: this.props.bottomTypes,
|
|
422
|
-
exportFileName: (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.config) === null || _this$props === void 0 ? void 0 : _this$props.exportFileName
|
|
423
|
-
});
|
|
424
|
-
if (bottomBarContainer && (_this$props$bottomTyp = this.props.bottomTypes) !== null && _this$props$bottomTyp !== void 0 && _this$props$bottomTyp.length) {
|
|
425
|
-
if (!bottomBarContainer.classList.contains('ueditor-bottom-bar-with-status')) {
|
|
426
|
-
bottomBarContainer.classList.add('ueditor-bottom-bar-with-status');
|
|
427
|
-
}
|
|
428
|
-
var statusContainer = bottomBarContainer.querySelector("#".concat(id, "_bottomStatusBar"));
|
|
429
|
-
if (!statusContainer) {
|
|
430
|
-
statusContainer = document.createElement('div');
|
|
431
|
-
statusContainer.id = "".concat(id, "_bottomStatusBar");
|
|
432
|
-
bottomBarContainer.appendChild(statusContainer);
|
|
433
|
-
}
|
|
434
|
-
ReactDOM.render(comp, statusContainer);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
345
|
+
}())
|
|
437
346
|
}, {
|
|
438
347
|
key: "render",
|
|
439
348
|
value: function render() {
|
package/es/type.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormatSettings } from './tools/generateStylesFromSettings';
|
|
3
2
|
interface IUeditorStype extends React.CSSProperties {
|
|
4
3
|
toolbarColor?: string;
|
|
5
4
|
}
|
|
@@ -69,10 +68,6 @@ export interface ILcdpUeditorProps {
|
|
|
69
68
|
*/
|
|
70
69
|
videoAllowFiles?: string[];
|
|
71
70
|
maximumWords?: number;
|
|
72
|
-
/**
|
|
73
|
-
* 导出文件名
|
|
74
|
-
*/
|
|
75
|
-
exportFileName?: string;
|
|
76
71
|
};
|
|
77
72
|
toolbars?: string[][];
|
|
78
73
|
/**
|
|
@@ -105,22 +100,6 @@ export interface ILcdpUeditorProps {
|
|
|
105
100
|
* @param val 编辑器内容
|
|
106
101
|
*/
|
|
107
102
|
onChange?(val: string): void;
|
|
108
|
-
/**
|
|
109
|
-
* 样式前缀
|
|
110
|
-
*/
|
|
111
|
-
prefixCls?: string;
|
|
112
|
-
/**
|
|
113
|
-
* 格式设置变化
|
|
114
|
-
*/
|
|
115
|
-
onFormatChange?(val: FormatSettings): void;
|
|
116
|
-
/**
|
|
117
|
-
* 默认格式设置
|
|
118
|
-
*/
|
|
119
|
-
defaultFormatSetting?: FormatSettings;
|
|
120
|
-
/**
|
|
121
|
-
* 底部功能类型
|
|
122
|
-
*/
|
|
123
|
-
bottomTypes?: Array<'chineseCount' | 'charCount' | 'pageWidth' | 'formatSetting' | 'exportPdf' | 'fullScreen' | 'copy'>;
|
|
124
103
|
}
|
|
125
104
|
export interface ILcdpUeditorInst {
|
|
126
105
|
/**
|
package/es/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,aAAc,SAAQ,KAAK,CAAC,aAAa;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,iBAAiB;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE;QAEL;;WAEG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC;QAE7B;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAE3B;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAE1B;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAE3B;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAG3B,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IAEF,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC;IAEhC;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;QAChC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;QAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB,CAAC,CAAC;IAEH;;;OAGG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAGD,MAAM,WAAW,gBAAgB;IAE7B;;OAEG;IACH,UAAU,IAAI,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,IAAI,MAAM,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,IAAI,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;CAC3B"}
|
package/lib/LcdpUeditor.d.ts
CHANGED
|
@@ -38,19 +38,14 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
38
38
|
*/
|
|
39
39
|
private uploadFunction;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* 是否加载完成
|
|
42
42
|
*/
|
|
43
|
-
private
|
|
44
|
-
/**
|
|
45
|
-
* 是否全屏
|
|
46
|
-
*/
|
|
47
|
-
private prefixCls;
|
|
43
|
+
private isReady;
|
|
48
44
|
/**
|
|
49
45
|
* 初始加载失败
|
|
50
46
|
*/
|
|
51
47
|
state: Readonly<{
|
|
52
48
|
initError: boolean;
|
|
53
|
-
isReady: boolean;
|
|
54
49
|
}>;
|
|
55
50
|
/**
|
|
56
51
|
* 编辑器配置项
|
|
@@ -59,7 +54,6 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
59
54
|
constructor(props: ILcdpUeditorProps);
|
|
60
55
|
componentDidMount(): void;
|
|
61
56
|
componentWillReceiveProps(nextProps: ILcdpUeditorProps): void;
|
|
62
|
-
componentDidUpdate(prevProps: Readonly<ILcdpUeditorProps>): void;
|
|
63
57
|
componentWillUnmount(): void;
|
|
64
58
|
private onContentChange;
|
|
65
59
|
private getExtString;
|
|
@@ -82,10 +76,6 @@ declare class LcdpUeditor extends React.Component<ILcdpUeditorProps, {}> {
|
|
|
82
76
|
* 初始化编辑器实例
|
|
83
77
|
*/
|
|
84
78
|
initUeditor(): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* 渲染状态栏
|
|
87
|
-
*/
|
|
88
|
-
renderStatusBar(): void;
|
|
89
79
|
render(): React.ReactNode;
|
|
90
80
|
}
|
|
91
81
|
export default LcdpUeditor;
|
package/lib/LcdpUeditor.js
CHANGED
|
@@ -33,13 +33,11 @@ __export(LcdpUeditor_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(LcdpUeditor_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_dom = __toESM(require("react-dom"));
|
|
37
36
|
var import_const = require("./const");
|
|
38
37
|
var import_defaultConfig = __toESM(require("./defaultConfig.json"));
|
|
39
38
|
var import_UeditorResourceLoader = __toESM(require("./tools/UeditorResourceLoader"));
|
|
40
39
|
var import_debounce = __toESM(require("lodash/debounce"));
|
|
41
40
|
var import_filterHtmlNode = require("./tools/filterHtmlNode");
|
|
42
|
-
var import_ToolBottomBar = __toESM(require("./ToolBottomBar"));
|
|
43
41
|
var LcdpUeditor = class extends import_react.default.Component {
|
|
44
42
|
constructor(props) {
|
|
45
43
|
super(props);
|
|
@@ -68,24 +66,20 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
68
66
|
*/
|
|
69
67
|
this.currentContent = "";
|
|
70
68
|
/**
|
|
71
|
-
*
|
|
69
|
+
* 是否加载完成
|
|
72
70
|
*/
|
|
73
|
-
this.
|
|
71
|
+
this.isReady = false;
|
|
74
72
|
/**
|
|
75
73
|
* 初始加载失败
|
|
76
74
|
*/
|
|
77
75
|
this.state = {
|
|
78
|
-
initError: false
|
|
79
|
-
/**
|
|
80
|
-
* 是否加载完成
|
|
81
|
-
*/
|
|
82
|
-
isReady: false
|
|
76
|
+
initError: false
|
|
83
77
|
};
|
|
84
78
|
/**
|
|
85
79
|
* 编辑器配置项
|
|
86
80
|
*/
|
|
87
81
|
this.editorConfig = {};
|
|
88
|
-
const { config
|
|
82
|
+
const { config } = props;
|
|
89
83
|
this.containerId = `ueditor_${Date.now()}_${String(Math.random()).slice(2, 6)}`;
|
|
90
84
|
if (this.props.ueditorPath) {
|
|
91
85
|
this.ueditorPath = this.props.ueditorPath;
|
|
@@ -109,7 +103,6 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
109
103
|
}
|
|
110
104
|
return null;
|
|
111
105
|
};
|
|
112
|
-
this.prefixCls = prefixCls || "pcfactory";
|
|
113
106
|
this.editorConfig = {
|
|
114
107
|
...import_defaultConfig.default,
|
|
115
108
|
maximumWords: (config == null ? void 0 : config.maximumWords) || 1e4,
|
|
@@ -120,9 +113,7 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
120
113
|
},
|
|
121
114
|
uploadFunction: this.uploadFunction,
|
|
122
115
|
initialContent: "",
|
|
123
|
-
pasteplain: (config == null ? void 0 : config.pasteplain) === true
|
|
124
|
-
onFormatChange,
|
|
125
|
-
exportFileName: (config == null ? void 0 : config.exportFileName) || "未命名"
|
|
116
|
+
pasteplain: (config == null ? void 0 : config.pasteplain) === true
|
|
126
117
|
};
|
|
127
118
|
this.debounceContentChange = (0, import_debounce.default)(this.onContentChange.bind(this), 300);
|
|
128
119
|
}
|
|
@@ -130,7 +121,7 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
130
121
|
this.initUeditor();
|
|
131
122
|
}
|
|
132
123
|
componentWillReceiveProps(nextProps) {
|
|
133
|
-
if (this.
|
|
124
|
+
if (this.isReady) {
|
|
134
125
|
if ("value" in nextProps && this.currentContent !== nextProps.value) {
|
|
135
126
|
this.isReportFlag = false;
|
|
136
127
|
this.ueditorInst.setContent((0, import_filterHtmlNode.filterHtmlNode)(nextProps.value || "").str);
|
|
@@ -144,20 +135,10 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
137
|
}
|
|
147
|
-
componentDidUpdate(prevProps) {
|
|
148
|
-
if (this.state.isReady && prevProps.defaultFormatSetting !== this.props.defaultFormatSetting) {
|
|
149
|
-
this.renderStatusBar();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
138
|
componentWillUnmount() {
|
|
153
|
-
var _a, _b
|
|
154
|
-
if (this.
|
|
155
|
-
|
|
156
|
-
if (editorBody && this.compositionEndHandler) {
|
|
157
|
-
editorBody.removeEventListener("compositionend", this.compositionEndHandler);
|
|
158
|
-
this.compositionEndHandler = void 0;
|
|
159
|
-
}
|
|
160
|
-
(_c = (_b = this.ueditorInst) == null ? void 0 : _b.destroy) == null ? void 0 : _c.call(_b);
|
|
139
|
+
var _a, _b;
|
|
140
|
+
if (this.isReady) {
|
|
141
|
+
(_b = (_a = this.ueditorInst) == null ? void 0 : _a.destroy) == null ? void 0 : _b.call(_a);
|
|
161
142
|
}
|
|
162
143
|
}
|
|
163
144
|
onContentChange() {
|
|
@@ -253,29 +234,11 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
253
234
|
* 初始化编辑器实例
|
|
254
235
|
*/
|
|
255
236
|
async initUeditor() {
|
|
256
|
-
|
|
257
|
-
const readyFunc = () => {
|
|
237
|
+
import_UeditorResourceLoader.default.onReady(() => {
|
|
258
238
|
this.initConfig();
|
|
259
|
-
let target = document.getElementById(this.containerId);
|
|
260
|
-
if (!window.UE || !target) {
|
|
261
|
-
timer = setInterval(() => {
|
|
262
|
-
target = document.getElementById(this.containerId);
|
|
263
|
-
if (target) {
|
|
264
|
-
clearInterval(timer);
|
|
265
|
-
readyFunc();
|
|
266
|
-
}
|
|
267
|
-
}, 50);
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
239
|
this.ueditorInst = window.UE.getEditor(this.containerId, this.editorConfig);
|
|
271
240
|
this.ueditorInst.ready(() => {
|
|
272
|
-
|
|
273
|
-
if (nextValue) {
|
|
274
|
-
this.ueditorInst.setContent(nextValue);
|
|
275
|
-
}
|
|
276
|
-
this.setState({
|
|
277
|
-
isReady: true
|
|
278
|
-
});
|
|
241
|
+
this.isReady = true;
|
|
279
242
|
if (this.props.disabled) {
|
|
280
243
|
this.ueditorInst.setDisabled();
|
|
281
244
|
} else {
|
|
@@ -284,20 +247,13 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
284
247
|
this.ueditorInst.addListener("contentChange", () => {
|
|
285
248
|
this.debounceContentChange();
|
|
286
249
|
});
|
|
287
|
-
const editorBody = this.ueditorInst.body;
|
|
288
|
-
if (editorBody) {
|
|
289
|
-
this.compositionEndHandler = () => {
|
|
290
|
-
this.debounceContentChange();
|
|
291
|
-
};
|
|
292
|
-
editorBody.addEventListener("compositionend", this.compositionEndHandler);
|
|
293
|
-
}
|
|
294
250
|
this.initStyle();
|
|
295
|
-
this.mountRef();
|
|
296
|
-
this.renderStatusBar();
|
|
297
251
|
});
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const jsList = [
|
|
252
|
+
this.mountRef();
|
|
253
|
+
});
|
|
254
|
+
const jsList = [
|
|
255
|
+
`${this.ueditorPath}/${import_const.DEFAULT_UEDITOR_CONFIG.UEDITOR_ALL}`
|
|
256
|
+
];
|
|
301
257
|
import_UeditorResourceLoader.default.onLoadError(() => {
|
|
302
258
|
this.setState({
|
|
303
259
|
initError: true
|
|
@@ -305,39 +261,6 @@ var LcdpUeditor = class extends import_react.default.Component {
|
|
|
305
261
|
});
|
|
306
262
|
import_UeditorResourceLoader.default.startLoad(jsList);
|
|
307
263
|
}
|
|
308
|
-
/**
|
|
309
|
-
* 渲染状态栏
|
|
310
|
-
*/
|
|
311
|
-
renderStatusBar() {
|
|
312
|
-
var _a, _b, _c, _d;
|
|
313
|
-
const { id } = this.ueditorInst.ui || {};
|
|
314
|
-
const bottomBarContainer = (_a = this.containerRef.current) == null ? void 0 : _a.querySelector(`#${id}_bottombar`);
|
|
315
|
-
const comp = /* @__PURE__ */ import_react.default.createElement(
|
|
316
|
-
import_ToolBottomBar.default,
|
|
317
|
-
{
|
|
318
|
-
ueditorInst: this.ueditorInst,
|
|
319
|
-
prefixCls: this.prefixCls,
|
|
320
|
-
containerRef: this.containerRef,
|
|
321
|
-
defaultFormatSetting: this.props.defaultFormatSetting,
|
|
322
|
-
onFormatChange: this.editorConfig.onFormatChange,
|
|
323
|
-
isReady: this.state.isReady,
|
|
324
|
-
bottomTypes: this.props.bottomTypes,
|
|
325
|
-
exportFileName: (_c = (_b = this.props) == null ? void 0 : _b.config) == null ? void 0 : _c.exportFileName
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
if (bottomBarContainer && ((_d = this.props.bottomTypes) == null ? void 0 : _d.length)) {
|
|
329
|
-
if (!bottomBarContainer.classList.contains("ueditor-bottom-bar-with-status")) {
|
|
330
|
-
bottomBarContainer.classList.add("ueditor-bottom-bar-with-status");
|
|
331
|
-
}
|
|
332
|
-
let statusContainer = bottomBarContainer.querySelector(`#${id}_bottomStatusBar`);
|
|
333
|
-
if (!statusContainer) {
|
|
334
|
-
statusContainer = document.createElement("div");
|
|
335
|
-
statusContainer.id = `${id}_bottomStatusBar`;
|
|
336
|
-
bottomBarContainer.appendChild(statusContainer);
|
|
337
|
-
}
|
|
338
|
-
import_react_dom.default.render(comp, statusContainer);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
264
|
render() {
|
|
342
265
|
const { initError } = this.state;
|
|
343
266
|
if (initError) {
|
package/lib/type.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormatSettings } from './tools/generateStylesFromSettings';
|
|
3
2
|
interface IUeditorStype extends React.CSSProperties {
|
|
4
3
|
toolbarColor?: string;
|
|
5
4
|
}
|
|
@@ -69,10 +68,6 @@ export interface ILcdpUeditorProps {
|
|
|
69
68
|
*/
|
|
70
69
|
videoAllowFiles?: string[];
|
|
71
70
|
maximumWords?: number;
|
|
72
|
-
/**
|
|
73
|
-
* 导出文件名
|
|
74
|
-
*/
|
|
75
|
-
exportFileName?: string;
|
|
76
71
|
};
|
|
77
72
|
toolbars?: string[][];
|
|
78
73
|
/**
|
|
@@ -105,22 +100,6 @@ export interface ILcdpUeditorProps {
|
|
|
105
100
|
* @param val 编辑器内容
|
|
106
101
|
*/
|
|
107
102
|
onChange?(val: string): void;
|
|
108
|
-
/**
|
|
109
|
-
* 样式前缀
|
|
110
|
-
*/
|
|
111
|
-
prefixCls?: string;
|
|
112
|
-
/**
|
|
113
|
-
* 格式设置变化
|
|
114
|
-
*/
|
|
115
|
-
onFormatChange?(val: FormatSettings): void;
|
|
116
|
-
/**
|
|
117
|
-
* 默认格式设置
|
|
118
|
-
*/
|
|
119
|
-
defaultFormatSetting?: FormatSettings;
|
|
120
|
-
/**
|
|
121
|
-
* 底部功能类型
|
|
122
|
-
*/
|
|
123
|
-
bottomTypes?: Array<'chineseCount' | 'charCount' | 'pageWidth' | 'formatSetting' | 'exportPdf' | 'fullScreen' | 'copy'>;
|
|
124
103
|
}
|
|
125
104
|
export interface ILcdpUeditorInst {
|
|
126
105
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxiteam/lcdp-ueditor-react",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -18,19 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/lodash": "^4.14.180",
|
|
21
|
-
"father": "^4.1.9"
|
|
22
|
-
"@types/file-saver": "^2.0.5"
|
|
21
|
+
"father": "^4.1.9"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
24
|
"react": "^16.12.0 || ^17.0.0",
|
|
26
25
|
"lodash": "^4.0.0"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "7.23.2"
|
|
30
|
-
"jspdf": "^2.5.1",
|
|
31
|
-
"file-saver": "^2.0.5",
|
|
32
|
-
"antd": "4.24.13",
|
|
33
|
-
"html2canvas": "^1.4.1"
|
|
28
|
+
"@babel/runtime": "7.23.2"
|
|
34
29
|
},
|
|
35
30
|
"publishConfig": {
|
|
36
31
|
"access": "public",
|
|
@@ -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();
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<title>ueditor图片对话框</title>
|
|
6
|
-
<script type="text/javascript" src="../internal.js?
|
|
6
|
+
<script type="text/javascript" src="../internal.js?04dbe7f0"></script>
|
|
7
7
|
|
|
8
8
|
<!-- jquery -->
|
|
9
|
-
<script type="text/javascript" src="../../third-party/jquery-3.5.1.js?
|
|
9
|
+
<script type="text/javascript" src="../../third-party/jquery-3.5.1.js?9a0f9431"></script>
|
|
10
10
|
|
|
11
11
|
<!-- webuploader -->
|
|
12
12
|
<script src="../../third-party/webuploader/webuploader.js?5e398948"></script>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
|
-
<script type="text/javascript" src="attachment.js?
|
|
58
|
+
<script type="text/javascript" src="attachment.js?244c9b92"></script>
|
|
59
59
|
|
|
60
60
|
</body>
|
|
61
61
|
</html>
|