@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.
Files changed (76) hide show
  1. package/es/LcdpUeditor.d.ts.map +1 -1
  2. package/es/LcdpUeditor.js +2 -1
  3. package/es/tools/UeditorResourceLoader.d.ts +1 -1
  4. package/es/tools/UeditorResourceLoader.d.ts.map +1 -1
  5. package/es/tools/UeditorResourceLoader.js +18 -7
  6. package/es/tools/filterHtmlNode.d.ts.map +1 -1
  7. package/es/tools/filterHtmlNode.js +7 -2
  8. package/lib/LcdpUeditor.js +1 -3
  9. package/lib/tools/UeditorResourceLoader.d.ts +1 -1
  10. package/lib/tools/UeditorResourceLoader.js +15 -7
  11. package/lib/tools/filterHtmlNode.js +8 -4
  12. package/package.json +1 -1
  13. package/ueditor-resource/dialogs/anchor/anchor.html +1 -1
  14. package/ueditor-resource/dialogs/attachment/attachment.css +2 -715
  15. package/ueditor-resource/dialogs/attachment/attachment.html +6 -6
  16. package/ueditor-resource/dialogs/attachment/attachment.js +2 -803
  17. package/ueditor-resource/dialogs/audio/audio.css +2 -878
  18. package/ueditor-resource/dialogs/audio/audio.js +2 -815
  19. package/ueditor-resource/dialogs/background/background.css +2 -192
  20. package/ueditor-resource/dialogs/background/background.html +3 -3
  21. package/ueditor-resource/dialogs/background/background.js +2 -370
  22. package/ueditor-resource/dialogs/contentimport/contentimport.html +3 -3
  23. package/ueditor-resource/dialogs/contentimport/contentimport.js +2 -91
  24. package/ueditor-resource/dialogs/emotion/emotion.css +2 -128
  25. package/ueditor-resource/dialogs/emotion/emotion.html +3 -3
  26. package/ueditor-resource/dialogs/emotion/emotion.js +2 -186
  27. package/ueditor-resource/dialogs/formula/formula.html +4 -4
  28. package/ueditor-resource/dialogs/formula/formula.js +2 -147
  29. package/ueditor-resource/dialogs/help/help.css +2 -36
  30. package/ueditor-resource/dialogs/help/help.html +3 -3
  31. package/ueditor-resource/dialogs/help/help.js +2 -57
  32. package/ueditor-resource/dialogs/image/image.css +2 -767
  33. package/ueditor-resource/dialogs/image/image.js +2 -1060
  34. package/ueditor-resource/dialogs/insertframe/insertframe.html +2 -2
  35. package/ueditor-resource/dialogs/internal.js +2 -81
  36. package/ueditor-resource/dialogs/preview/preview.html +2 -2
  37. package/ueditor-resource/dialogs/scrawl/scrawl.css +2 -323
  38. package/ueditor-resource/dialogs/scrawl/scrawl.html +3 -3
  39. package/ueditor-resource/dialogs/scrawl/scrawl.js +2 -682
  40. package/ueditor-resource/dialogs/searchreplace/searchreplace.html +2 -2
  41. package/ueditor-resource/dialogs/searchreplace/searchreplace.js +2 -174
  42. package/ueditor-resource/dialogs/spechars/spechars.html +2 -2
  43. package/ueditor-resource/dialogs/spechars/spechars.js +2 -86
  44. package/ueditor-resource/dialogs/table/edittable.css +2 -84
  45. package/ueditor-resource/dialogs/table/edittable.html +3 -3
  46. package/ueditor-resource/dialogs/table/edittable.js +2 -241
  47. package/ueditor-resource/dialogs/table/edittd.html +1 -1
  48. package/ueditor-resource/dialogs/table/edittip.html +1 -1
  49. package/ueditor-resource/dialogs/template/config.js +2 -42
  50. package/ueditor-resource/dialogs/template/template.css +2 -98
  51. package/ueditor-resource/dialogs/template/template.html +4 -4
  52. package/ueditor-resource/dialogs/template/template.js +2 -53
  53. package/ueditor-resource/dialogs/video/video.css +2 -908
  54. package/ueditor-resource/dialogs/video/video.js +2 -867
  55. package/ueditor-resource/dialogs/wordimage/wordimage.html +5 -5
  56. package/ueditor-resource/dialogs/wordimage/wordimage.js +2 -93
  57. package/ueditor-resource/lang/en/en.js +2 -686
  58. package/ueditor-resource/lang/zh-cn/zh-cn.js +2 -748
  59. package/ueditor-resource/lang/zh-tw/zh-tw.js +2 -748
  60. package/ueditor-resource/plugins/demo/demo.js +1 -3
  61. package/ueditor-resource/themes/default/css/ueditor.css +2 -2148
  62. package/ueditor-resource/themes/default/dialog.css +2 -16
  63. package/ueditor-resource/themes/default/dialogbase.css +2 -131
  64. package/ueditor-resource/themes/iframe.css +2 -62
  65. package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +4 -3655
  66. package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +3 -1
  67. package/ueditor-resource/third-party/clipboard/clipboard.js +2 -753
  68. package/ueditor-resource/third-party/codemirror/codemirror.css +2 -105
  69. package/ueditor-resource/third-party/codemirror/codemirror.js +3 -3581
  70. package/ueditor-resource/third-party/jquery-3.5.1.js +4 -2
  71. package/ueditor-resource/third-party/jquery-3.5.1_1.js +4 -4314
  72. package/ueditor-resource/third-party/webuploader/webuploader.css +2 -87
  73. package/ueditor-resource/third-party/webuploader/webuploader.js +5 -4
  74. package/ueditor-resource/ueditor.all.js +20 -32644
  75. package/ueditor-resource/ueditor.config.js +2 -655
  76. package/ueditor-resource/ueditor.parse.js +2 -639
@@ -1,91 +1,2 @@
1
- var contentImport = {};
2
- var g = $G;
3
-
4
- contentImport.data = {
5
- result: null,
6
- };
7
- contentImport.init = function (opt, callbacks) {
8
- addUploadButtonListener();
9
- addOkListener();
10
- };
11
-
12
- function processWord(file) {
13
- $('.file-tip').html('正在转换Word文件,请稍后...');
14
- $('.file-result').html('').hide();
15
- var reader = new FileReader();
16
- reader.onload = function (loadEvent) {
17
- mammoth.convertToHtml({
18
- arrayBuffer: loadEvent.target.result
19
- })
20
- .then(function displayResult(result) {
21
- $('.file-tip').html('转换成功');
22
- contentImport.data.result = result.value;
23
- $('.file-result').html(result.value).show();
24
- }, function (error) {
25
- $('.file-tip').html('Word文件转换失败:' + error);
26
- });
27
- };
28
- reader.onerror = function (loadEvent) {
29
- $('.file-tip').html('Word文件转换失败:' + loadEvent);
30
- };
31
- reader.readAsArrayBuffer(file);
32
- }
33
-
34
- function processMarkdown( markdown ){
35
- var converter = new showdown.Converter();
36
- var html = converter.makeHtml(markdown);
37
- $('.file-tip').html('转换成功');
38
- contentImport.data.result = html;
39
- $('.file-result').html(html).show();
40
- }
41
-
42
- function processMarkdownFile(file) {
43
- $('.file-tip').html('正在转换Markdown文件,请稍后...');
44
- $('.file-result').html('').hide();
45
- var reader = new FileReader();
46
- reader.onload = function (loadEvent) {
47
- processMarkdown( loadEvent.target.result );
48
- };
49
- reader.onerror = function (loadEvent) {
50
- $('.file-tip').html('Markdown文件转换失败:' + loadEvent);
51
- };
52
- reader.readAsText(file, "UTF-8");
53
- }
54
-
55
- function addUploadButtonListener() {
56
- g('contentImport').addEventListener('change', function () {
57
- const file = this.files[0];
58
- const fileName = file.name;
59
- const fileExt = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
60
- switch (fileExt) {
61
- case 'docx':
62
- case 'doc':
63
- processWord(file);
64
- break;
65
- case 'md':
66
- processMarkdownFile(file);
67
- break;
68
- default:
69
- $('.file-tip').html('不支持的文件格式:' + fileExt);
70
- break;
71
- }
72
- });
73
- g('fileInputConfirm').addEventListener('click', function () {
74
- processMarkdown( g('fileInputContent').value );
75
- $('.file-input').hide();
76
- });
77
- }
78
-
79
- function addOkListener() {
80
- dialog.onok = function () {
81
- if (!contentImport.data.result) {
82
- alert('请先上传文件识别内容');
83
- return false;
84
- }
85
- editor.fireEvent('saveScene');
86
- editor.execCommand("inserthtml", contentImport.data.result);
87
- editor.fireEvent('saveScene');
88
- };
89
- dialog.oncancel = function () {
90
- };
91
- }
1
+ /*! UEditorPlus v2.0.0*/
2
+ function processWord(a){$(".file-tip").html("正在转换Word文件,请稍后..."),$(".file-result").html("").hide();var b=new FileReader;b.onload=function(a){mammoth.convertToHtml({arrayBuffer:a.target.result}).then(function(a){$(".file-tip").html("转换成功"),contentImport.data.result=a.value,$(".file-result").html(a.value).show()},function(a){$(".file-tip").html("Word文件转换失败:"+a)})},b.onerror=function(a){$(".file-tip").html("Word文件转换失败:"+a)},b.readAsArrayBuffer(a)}function processMarkdown(a){var b=new showdown.Converter,c=b.makeHtml(a);$(".file-tip").html("转换成功"),contentImport.data.result=c,$(".file-result").html(c).show()}function processMarkdownFile(a){$(".file-tip").html("正在转换Markdown文件,请稍后..."),$(".file-result").html("").hide();var b=new FileReader;b.onload=function(a){processMarkdown(a.target.result)},b.onerror=function(a){$(".file-tip").html("Markdown文件转换失败:"+a)},b.readAsText(a,"UTF-8")}function addUploadButtonListener(){g("contentImport").addEventListener("change",function(){const a=this.files[0],b=a.name,c=b.substring(b.lastIndexOf(".")+1).toLowerCase();switch(c){case"docx":case"doc":processWord(a);break;case"md":processMarkdownFile(a);break;default:$(".file-tip").html("不支持的文件格式:"+c)}}),g("fileInputConfirm").addEventListener("click",function(){processMarkdown(g("fileInputContent").value),$(".file-input").hide()})}function addOkListener(){dialog.onok=function(){return contentImport.data.result?(editor.fireEvent("saveScene"),editor.execCommand("inserthtml",contentImport.data.result),void editor.fireEvent("saveScene")):(alert("请先上传文件识别内容"),!1)},dialog.oncancel=function(){}}var contentImport={},g=$G;contentImport.data={result:null},contentImport.init=function(a,b){addUploadButtonListener(),addOkListener()};
@@ -1,129 +1,3 @@
1
- .jd img {
2
- background: transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
3
- cursor: pointer;
4
- width: 35px;
5
- height: 35px;
6
- display: block;
7
- }
1
+ /*! UEditorPlus v2.0.0*/
8
2
 
9
- .pp img {
10
- background: transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
11
- cursor: pointer;
12
- width: 25px;
13
- height: 25px;
14
- display: block;
15
- }
16
-
17
- .ldw img {
18
- background: transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
19
- cursor: pointer;
20
- width: 35px;
21
- height: 35px;
22
- display: block;
23
- }
24
-
25
- .tsj img {
26
- background: transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
27
- cursor: pointer;
28
- width: 35px;
29
- height: 35px;
30
- display: block;
31
- }
32
-
33
- .cat img {
34
- background: transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
35
- cursor: pointer;
36
- width: 35px;
37
- height: 35px;
38
- display: block;
39
- }
40
-
41
- .bb img {
42
- background: transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
43
- cursor: pointer;
44
- width: 35px;
45
- height: 35px;
46
- display: block;
47
- }
48
-
49
- .youa img {
50
- background: transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
51
- cursor: pointer;
52
- width: 35px;
53
- height: 35px;
54
- display: block;
55
- }
56
-
57
- .smileytable td {
58
- height: 37px;
59
- }
60
-
61
- #tabPanel {
62
- margin-left: 5px;
63
- overflow: hidden;
64
- }
65
-
66
- #tabContent {
67
- float: left;
68
- background: #FFFFFF;
69
- }
70
-
71
- #tabContent div {
72
- display: none;
73
- width: 480px;
74
- overflow: hidden;
75
- }
76
-
77
- #tabIconReview.show {
78
- left: 17px;
79
- display: block;
80
- }
81
-
82
- .menuFocus {
83
- background: #ACCD3C;
84
- }
85
-
86
- .menuDefault {
87
- background: #FFFFFF;
88
- }
89
-
90
- #tabIconReview {
91
- position: absolute;
92
- left: 406px;
93
- left: 398px \9;
94
- top: 41px;
95
- z-index: 65533;
96
- width: 90px;
97
- height: 76px;
98
- }
99
-
100
- img.review {
101
- width: 90px;
102
- height: 76px;
103
- border: 2px solid #9cb945;
104
- background: #FFFFFF;
105
- background-position: center;
106
- background-repeat: no-repeat;
107
- }
108
-
109
- .wrapper .tabbody {
110
- position: relative;
111
- float: left;
112
- clear: both;
113
- padding: 10px;
114
- width: 95%;
115
- }
116
-
117
- .tabbody table {
118
- width: 100%;
119
- }
120
-
121
- .tabbody td {
122
- border: 1px solid #BAC498;
123
- }
124
-
125
- .tabbody td span {
126
- display: block;
127
- zoom: 1;
128
- padding: 0 4px;
129
- }
3
+ .jd img{background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.pp img{background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:25px;height:25px;display:block}.ldw img{background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.tsj img{background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.cat img{background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.bb img{background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.youa img{background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;cursor:pointer;width:35px;height:35px;display:block}.smileytable td{height:37px}#tabPanel{margin-left:5px;overflow:hidden}#tabContent{float:left;background:#FFF}#tabContent div{display:none;width:480px;overflow:hidden}#tabIconReview.show{left:17px;display:block}.menuFocus{background:#ACCD3C}.menuDefault{background:#FFF}#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px}img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFF;background-position:center;background-repeat:no-repeat}.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width:95%}.tabbody table{width:100%}.tabbody td{border:1px solid #BAC498}.tabbody td span{display:block;zoom:1;padding:0 4px}
@@ -4,8 +4,8 @@
4
4
  <title></title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
6
  <meta name="robots" content="noindex, nofollow"/>
7
- <script type="text/javascript" src="../internal.js?aea0c61c"></script>
8
- <link rel="stylesheet" type="text/css" href="emotion.css?d5b42328">
7
+ <script type="text/javascript" src="../internal.js?04dbe7f0"></script>
8
+ <link rel="stylesheet" type="text/css" href="emotion.css?f71063c6">
9
9
  </head>
10
10
  <body>
11
11
  <div id="tabPanel" class="wrapper">
@@ -31,7 +31,7 @@
31
31
  <div id="tabIconReview">
32
32
  <img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
33
33
  </div>
34
- <script type="text/javascript" src="emotion.js?61027075"></script>
34
+ <script type="text/javascript" src="emotion.js?cb3216b7"></script>
35
35
  <script type="text/javascript">
36
36
  var emotion = {
37
37
  tabNum: 7, //切换面板数量
@@ -1,186 +1,2 @@
1
- window.onload = function () {
2
- editor.setOpt({
3
- emotionLocalization: false
4
- });
5
-
6
- emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
7
- emotion.SmileyBox = createTabList(emotion.tabNum);
8
- emotion.tabExist = createArr(emotion.tabNum);
9
-
10
- initImgName();
11
- initEvtHandler("tabHeads");
12
- };
13
-
14
- function initImgName() {
15
- for (var pro in emotion.SmilmgName) {
16
- var tempName = emotion.SmilmgName[pro],
17
- tempBox = emotion.SmileyBox[pro],
18
- tempStr = "";
19
-
20
- if (tempBox.length) return;
21
- for (var i = 1; i <= tempName[1]; i++) {
22
- tempStr = tempName[0];
23
- if (i < 10) tempStr = tempStr + '0';
24
- tempStr = tempStr + i + '.gif';
25
- tempBox.push(tempStr);
26
- }
27
- }
28
- }
29
-
30
- function initEvtHandler(conId) {
31
- var tabHeads = $G(conId);
32
- for (var i = 0, j = 0; i < tabHeads.childNodes.length; i++) {
33
- var tabObj = tabHeads.childNodes[i];
34
- if (tabObj.nodeType == 1) {
35
- domUtils.on(tabObj, "click", (function (index) {
36
- return function () {
37
- switchTab(index);
38
- };
39
- })(j));
40
- j++;
41
- }
42
- }
43
- switchTab(0);
44
- $G("tabIconReview").style.display = 'none';
45
- }
46
-
47
- function InsertSmiley(url, evt) {
48
- var obj = {
49
- src: editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
50
- };
51
- obj._src = obj.src;
52
- editor.execCommand('insertimage', obj);
53
- if (!evt.ctrlKey) {
54
- dialog.popup.hide();
55
- }
56
- }
57
-
58
- function switchTab(index) {
59
-
60
- autoHeight(index);
61
- if (emotion.tabExist[index] == 0) {
62
- emotion.tabExist[index] = 1;
63
- createTab('tab' + index);
64
- }
65
- //获取呈现元素句柄数组
66
- var tabHeads = $G("tabHeads").getElementsByTagName("span"),
67
- tabBodys = $G("tabBodys").getElementsByTagName("div"),
68
- i = 0, L = tabHeads.length;
69
- //隐藏所有呈现元素
70
- for (; i < L; i++) {
71
- tabHeads[i].className = "";
72
- tabBodys[i].style.display = "none";
73
- }
74
- //显示对应呈现元素
75
- tabHeads[index].className = "focus";
76
- tabBodys[index].style.display = "block";
77
- }
78
-
79
- function autoHeight(index) {
80
- var iframe = dialog.getDom("iframe"),
81
- parent = iframe.parentNode.parentNode;
82
- switch (index) {
83
- case 0:
84
- iframe.style.height = "380px";
85
- parent.style.height = "392px";
86
- break;
87
- case 1:
88
- iframe.style.height = "220px";
89
- parent.style.height = "232px";
90
- break;
91
- case 2:
92
- iframe.style.height = "260px";
93
- parent.style.height = "272px";
94
- break;
95
- case 3:
96
- iframe.style.height = "300px";
97
- parent.style.height = "312px";
98
- break;
99
- case 4:
100
- iframe.style.height = "140px";
101
- parent.style.height = "152px";
102
- break;
103
- case 5:
104
- iframe.style.height = "260px";
105
- parent.style.height = "272px";
106
- break;
107
- case 6:
108
- iframe.style.height = "230px";
109
- parent.style.height = "242px";
110
- break;
111
- default:
112
-
113
- }
114
- }
115
-
116
-
117
- function createTab(tabName) {
118
- var faceVersion = "?v=1.1", //版本号
119
- tab = $G(tabName), //获取将要生成的Div句柄
120
- imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
121
- positionLine = 11 / 2, //中间数
122
- iWidth = iHeight = 35, //图片长宽
123
- iColWidth = 3, //表格剩余空间的显示比例
124
- tableCss = emotion.imageCss[tabName],
125
- cssOffset = emotion.imageCssOffset[tabName],
126
- textHTML = ['<table class="smileytable">'],
127
- i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
128
- sUrl, realUrl, posflag, offset, infor;
129
-
130
- for (; i < imgNum;) {
131
- textHTML.push('<tr>');
132
- for (var j = 0; j < imgColNum; j++, i++) {
133
- faceImage = emotion.SmileyBox[tabName][i];
134
- if (faceImage) {
135
- sUrl = imagePath + faceImage + faceVersion;
136
- realUrl = imagePath + faceImage;
137
- posflag = j < positionLine ? 0 : 1;
138
- offset = cssOffset * i * (-1) - 1;
139
- infor = emotion.SmileyInfor[tabName][i];
140
-
141
- textHTML.push('<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace(/'/g, "\\'") + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">');
142
- textHTML.push('<span>');
143
- textHTML.push('<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>');
144
- textHTML.push('</span>');
145
- } else {
146
- textHTML.push('<td width="' + iColWidth + '%" bgcolor="#FFFFFF">');
147
- }
148
- textHTML.push('</td>');
149
- }
150
- textHTML.push('</tr>');
151
- }
152
- textHTML.push('</table>');
153
- textHTML = textHTML.join("");
154
- tab.innerHTML = textHTML;
155
- }
156
-
157
- function over(td, srcPath, posFlag) {
158
- td.style.backgroundColor = "#ACCD3C";
159
- $G('faceReview').style.backgroundImage = "url(" + srcPath + ")";
160
- if (posFlag == 1) $G("tabIconReview").className = "show";
161
- $G("tabIconReview").style.display = 'block';
162
- }
163
-
164
- function out(td) {
165
- td.style.backgroundColor = "transparent";
166
- var tabIconRevew = $G("tabIconReview");
167
- tabIconRevew.className = "";
168
- tabIconRevew.style.display = 'none';
169
- }
170
-
171
- function createTabList(tabNum) {
172
- var obj = {};
173
- for (var i = 0; i < tabNum; i++) {
174
- obj["tab" + i] = [];
175
- }
176
- return obj;
177
- }
178
-
179
- function createArr(tabNum) {
180
- var arr = [];
181
- for (var i = 0; i < tabNum; i++) {
182
- arr[i] = 0;
183
- }
184
- return arr;
185
- }
186
-
1
+ /*! UEditorPlus v2.0.0*/
2
+ function initImgName(){for(var a in emotion.SmilmgName){var b=emotion.SmilmgName[a],c=emotion.SmileyBox[a],d="";if(c.length)return;for(var e=1;e<=b[1];e++)d=b[0],e<10&&(d+="0"),d=d+e+".gif",c.push(d)}}function initEvtHandler(a){for(var b=$G(a),c=0,d=0;c<b.childNodes.length;c++){var e=b.childNodes[c];1==e.nodeType&&(domUtils.on(e,"click",function(a){return function(){switchTab(a)}}(d)),d++)}switchTab(0),$G("tabIconReview").style.display="none"}function InsertSmiley(a,b){var c={src:editor.options.emotionLocalization?editor.options.UEDITOR_HOME_URL+"dialogs/emotion/"+a:a};c._src=c.src,editor.execCommand("insertimage",c),b.ctrlKey||dialog.popup.hide()}function switchTab(a){autoHeight(a),0==emotion.tabExist[a]&&(emotion.tabExist[a]=1,createTab("tab"+a));for(var b=$G("tabHeads").getElementsByTagName("span"),c=$G("tabBodys").getElementsByTagName("div"),d=0,e=b.length;d<e;d++)b[d].className="",c[d].style.display="none";b[a].className="focus",c[a].style.display="block"}function autoHeight(a){var b=dialog.getDom("iframe"),c=b.parentNode.parentNode;switch(a){case 0:b.style.height="380px",c.style.height="392px";break;case 1:b.style.height="220px",c.style.height="232px";break;case 2:b.style.height="260px",c.style.height="272px";break;case 3:b.style.height="300px",c.style.height="312px";break;case 4:b.style.height="140px",c.style.height="152px";break;case 5:b.style.height="260px",c.style.height="272px";break;case 6:b.style.height="230px",c.style.height="242px"}}function createTab(a){for(var b,c,d,e,f,g,h="?v=1.1",i=$G(a),j=emotion.SmileyPath+emotion.imageFolders[a],k=5.5,l=iHeight=35,m=3,n=emotion.imageCss[a],o=emotion.imageCssOffset[a],p=['<table class="smileytable">'],q=0,r=emotion.SmileyBox[a].length,s=11;q<r;){p.push("<tr>");for(var t=0;t<s;t++,q++)b=emotion.SmileyBox[a][q],b?(c=j+b+h,d=j+b,e=t<k?0:1,f=o*q*-1-1,g=emotion.SmileyInfor[a][q],p.push('<td class="'+n+'" border="1" width="'+m+'%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\''+d.replace(/'/g,"\\'")+"',event)\" onmouseover=\"over(this,'"+c+"','"+e+'\')" onmouseout="out(this)">'),p.push("<span>"),p.push('<img style="background-position:left '+f+'px;" title="'+g+'" src="'+emotion.SmileyPath+(editor.options.emotionLocalization?'0.gif" width="':'default/0.gif" width="')+l+'" height="'+iHeight+'"></img>'),p.push("</span>")):p.push('<td width="'+m+'%" bgcolor="#FFFFFF">'),p.push("</td>");p.push("</tr>")}p.push("</table>"),p=p.join(""),i.innerHTML=p}function over(a,b,c){a.style.backgroundColor="#ACCD3C",$G("faceReview").style.backgroundImage="url("+b+")",1==c&&($G("tabIconReview").className="show"),$G("tabIconReview").style.display="block"}function out(a){a.style.backgroundColor="transparent";var b=$G("tabIconReview");b.className="",b.style.display="none"}function createTabList(a){for(var b={},c=0;c<a;c++)b["tab"+c]=[];return b}function createArr(a){for(var b=[],c=0;c<a;c++)b[c]=0;return b}window.onload=function(){editor.setOpt({emotionLocalization:!1}),emotion.SmileyPath=editor.options.emotionLocalization===!0?"images/":"http://img.baidu.com/hi/",emotion.SmileyBox=createTabList(emotion.tabNum),emotion.tabExist=createArr(emotion.tabNum),initImgName(),initEvtHandler("tabHeads")};
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title></title>
5
5
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
6
- <script type="text/javascript" src="../internal.js?aea0c61c"></script>
6
+ <script type="text/javascript" src="../internal.js?04dbe7f0"></script>
7
7
  <style type="text/css">
8
8
  .wrapper {
9
9
  box-sizing: border-box;
@@ -86,9 +86,9 @@
86
86
  </div>
87
87
 
88
88
  </div>
89
- <script src="../../third-party/jquery-3.5.1.js?064a9f9e"></script>
90
- <script type="text/javascript" src="../../third-party/clipboard/clipboard.js?555edf0a"></script>
91
- <script type="text/javascript" src="formula.js?8fdd0a42"></script>
89
+ <script src="../../third-party/jquery-3.5.1.js?9a0f9431"></script>
90
+ <script type="text/javascript" src="../../third-party/clipboard/clipboard.js?bae63983"></script>
91
+ <script type="text/javascript" src="formula.js?3e957a67"></script>
92
92
  <script type="text/javascript">
93
93
  utils.domReady(function () {
94
94
  Formula.init();
@@ -1,147 +1,2 @@
1
- function preg_quote(str, delimiter) {
2
- // Quote regular expression characters plus an optional character
3
- //
4
- // version: 1107.2516
5
- // discuss at: http://phpjs.org/functions/preg_quote
6
- // + original by: booeyOH
7
- // + improved by: Ates Goral (http://magnetiq.com)
8
- // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
9
- // + bugfixed by: Onno Marsman
10
- // + improved by: Brett Zamir (http://brett-zamir.me)
11
- // * example 1: preg_quote("$40");
12
- // * returns 1: '\$40'
13
- // * example 2: preg_quote("*RRRING* Hello?");
14
- // * returns 2: '\*RRRING\* Hello\?'
15
- // * example 3: preg_quote("\\.+*?[^]$(){}=!<>|:");
16
- // * returns 3: '\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:'
17
- return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&');
18
- }
19
-
20
- function loadScript(url, cb) {
21
- var script;
22
- script = document.createElement('script');
23
- script.src = url;
24
- script.onload = function () {
25
- cb && cb({isNew: true})
26
- };
27
- document.getElementsByTagName('head')[0].appendChild(script);
28
- }
29
-
30
- var Formula = {
31
- mode: 'plain',
32
- latexeasy: null,
33
- init: function () {
34
- // console.log('Formula.init')
35
- Formula.initMode();
36
- Formula.initEvent();
37
- Formula.initSubmit();
38
- },
39
- renderPlain: function () {
40
- var $preview = $('#preview');
41
- var value = $('#editor').val();
42
- if (!value) {
43
- $preview.hide();
44
- return;
45
- }
46
- value = encodeURIComponent(value);
47
- var formulaConfig = editor.getOpt('formulaConfig');
48
- var src = formulaConfig.imageUrlTemplate.replace(/\{\}/, value);
49
- $('#previewImage').attr('src', src);
50
- $preview.show();
51
- },
52
- setValuePlain: function (value) {
53
- $('#editor').val(value);
54
- Formula.renderPlain();
55
- },
56
- setValueLive: function (value) {
57
- if (!Formula.latexeasy) {
58
- setTimeout(function () {
59
- Formula.setValueLive(value);
60
- }, 100);
61
- return;
62
- }
63
- Formula.latexeasy.call('set.latex', {latex: value});
64
- },
65
- initMode: function () {
66
- var formulaConfig = editor.getOpt('formulaConfig');
67
- if ('live' === formulaConfig.editorMode) {
68
- $('#liveEditor').attr('src', formulaConfig.editorLiveServer + '/editor');
69
- $('#modeLive').show();
70
- Formula.mode = 'live';
71
- } else {
72
- $('#modePlain').show();
73
- Formula.mode = 'plain';
74
- }
75
- var img = editor.selection.getRange().getClosedNode();
76
- if (img && img.getAttribute('data-formula-image') !== null) {
77
- var value = img.getAttribute('data-formula-image');
78
- if (value) {
79
- Formula.setValue(decodeURIComponent(value));
80
- }
81
- }
82
- },
83
- setValue: function (value) {
84
- switch (Formula.mode) {
85
- case 'plain':
86
- Formula.setValuePlain(value);
87
- break;
88
- case 'live':
89
- Formula.setValueLive(value);
90
- break;
91
- }
92
- },
93
- getValue: function (cb) {
94
- switch (Formula.mode) {
95
- case 'plain':
96
- cb($.trim($('#editor').val()));
97
- break;
98
- case 'live':
99
- Formula.latexeasy.call('get.latex', {}, function (data) {
100
- cb(data.latex);
101
- });
102
- break;
103
- }
104
- },
105
- initEvent: function () {
106
- var changeTimer = null, le;
107
- switch (Formula.mode) {
108
- case 'plain':
109
- // console.log('Formula.initEvent');
110
- $('#editor').on('change keypress', function () {
111
- changeTimer && clearTimeout(changeTimer);
112
- changeTimer = setTimeout(function () {
113
- Formula.renderPlain();
114
- }, 1000);
115
- });
116
- $('#inputDemo').on('click', function () {
117
- $('#editor').val('f(a) = \\frac{1}{2\\pi i} \\oint\\frac{f(z)}{z-a}dz');
118
- Formula.renderPlain();
119
- });
120
- break;
121
- case 'live':
122
- var formulaConfig = editor.getOpt('formulaConfig');
123
- loadScript(formulaConfig.editorLiveServer + '/vendor/LatexEasyEditor/editor/sdk.js', function () {
124
- le = new window.LatexEasy(document.getElementById('liveEditor'));
125
- le.on('ready', function () {
126
- Formula.latexeasy = le;
127
- });
128
- le.init();
129
- });
130
- break;
131
- }
132
- },
133
- initSubmit: function () {
134
- dialog.onclose = function (t, ok) {
135
- if (!ok) {
136
- return true;
137
- }
138
- // console.log('onclose', t, ok);
139
- Formula.getValue(function (value) {
140
- editor.execCommand('formula', value);
141
- editor.fireEvent('saveScene');
142
- dialog.close(false);
143
- });
144
- return false;
145
- };
146
- }
147
- };
1
+ /*! UEditorPlus v2.0.0*/
2
+ function preg_quote(a,b){return(a+"").replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(b||"")+"-]","g"),"\\$&")}function loadScript(a,b){var c;c=document.createElement("script"),c.src=a,c.onload=function(){b&&b({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(c)}var Formula={mode:"plain",latexeasy:null,init:function(){Formula.initMode(),Formula.initEvent(),Formula.initSubmit()},renderPlain:function(){var a=$("#preview"),b=$("#editor").val();if(!b)return void a.hide();b=encodeURIComponent(b);var c=editor.getOpt("formulaConfig"),d=c.imageUrlTemplate.replace(/\{\}/,b);$("#previewImage").attr("src",d),a.show()},setValuePlain:function(a){$("#editor").val(a),Formula.renderPlain()},setValueLive:function(a){return Formula.latexeasy?void Formula.latexeasy.call("set.latex",{latex:a}):void setTimeout(function(){Formula.setValueLive(a)},100)},initMode:function(){var a=editor.getOpt("formulaConfig");"live"===a.editorMode?($("#liveEditor").attr("src",a.editorLiveServer+"/editor"),$("#modeLive").show(),Formula.mode="live"):($("#modePlain").show(),Formula.mode="plain");var b=editor.selection.getRange().getClosedNode();if(b&&null!==b.getAttribute("data-formula-image")){var c=b.getAttribute("data-formula-image");c&&Formula.setValue(decodeURIComponent(c))}},setValue:function(a){switch(Formula.mode){case"plain":Formula.setValuePlain(a);break;case"live":Formula.setValueLive(a)}},getValue:function(a){switch(Formula.mode){case"plain":a($.trim($("#editor").val()));break;case"live":Formula.latexeasy.call("get.latex",{},function(b){a(b.latex)})}},initEvent:function(){var a,b=null;switch(Formula.mode){case"plain":$("#editor").on("change keypress",function(){b&&clearTimeout(b),b=setTimeout(function(){Formula.renderPlain()},1e3)}),$("#inputDemo").on("click",function(){$("#editor").val("f(a) = \\frac{1}{2\\pi i} \\oint\\frac{f(z)}{z-a}dz"),Formula.renderPlain()});break;case"live":var c=editor.getOpt("formulaConfig");loadScript(c.editorLiveServer+"/vendor/LatexEasyEditor/editor/sdk.js",function(){a=new window.LatexEasy(document.getElementById("liveEditor")),a.on("ready",function(){Formula.latexeasy=a}),a.init()})}},initSubmit:function(){dialog.onclose=function(a,b){return!b||(Formula.getValue(function(a){editor.execCommand("formula",a),editor.fireEvent("saveScene"),dialog.close(!1)}),!1)}}};
@@ -1,37 +1,3 @@
1
- .wrapper {
2
- width: 370px;
3
- margin: 10px auto;
4
- zoom: 1;
5
- }
1
+ /*! UEditorPlus v2.0.0*/
6
2
 
7
- .tabbody {
8
- height: 360px;
9
- }
10
-
11
- .tabbody .panel {
12
- width: 100%;
13
- height: 360px;
14
- position: absolute;
15
- background: #fff;
16
- }
17
-
18
- .tabbody .panel h1 {
19
- font-size: 26px;
20
- margin: 5px 0 0 5px;
21
- }
22
-
23
- .tabbody .panel p {
24
- font-size: 12px;
25
- margin: 5px 0 0 5px;
26
- }
27
-
28
- .tabbody table {
29
- width: 90%;
30
- line-height: 20px;
31
- margin: 5px 0 0 5px;;
32
- }
33
-
34
- .tabbody table thead {
35
- font-weight: bold;
36
- line-height: 25px;
37
- }
3
+ .wrapper{width:370px;margin:10px auto;zoom:1}.tabbody{height:360px}.tabbody .panel{width:100%;height:360px;position:absolute;background:#fff}.tabbody .panel h1{font-size:26px;margin:5px 0 0 5px}.tabbody .panel p{font-size:12px;margin:5px 0 0 5px}.tabbody table{width:90%;line-height:20px;margin:5px 0 0 5px}.tabbody table thead{font-weight:700;line-height:25px}
@@ -4,8 +4,8 @@
4
4
  <head>
5
5
  <title>帮助</title>
6
6
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
7
- <script type="text/javascript" src="../internal.js?aea0c61c"></script>
8
- <link rel="stylesheet" type="text/css" href="help.css?81231bdb">
7
+ <script type="text/javascript" src="../internal.js?04dbe7f0"></script>
8
+ <link rel="stylesheet" type="text/css" href="help.css?94b325b2">
9
9
  </head>
10
10
  <body>
11
11
  <div class="wrapper" id="helptab">
@@ -77,6 +77,6 @@
77
77
  </div>
78
78
  </div>
79
79
  </div>
80
- <script type="text/javascript" src="help.js?0a6823d2"></script>
80
+ <script type="text/javascript" src="help.js?cf43351e"></script>
81
81
  </body>
82
82
  </html>