@lingxiteam/lcdp-ueditor-react 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (132) hide show
  1. package/es/LcdpUeditor.d.ts +4 -0
  2. package/es/LcdpUeditor.js +76 -51
  3. package/es/const.js +4 -4
  4. package/es/defaultConfig.json +76 -76
  5. package/es/tools/UeditorResourceLoader.js +6 -6
  6. package/es/tools/filterHtmlNode.d.ts +5 -0
  7. package/es/tools/filterHtmlNode.js +41 -0
  8. package/es/tools/loadScript.js +3 -3
  9. package/es/type.d.ts +7 -1
  10. package/lib/LcdpUeditor.d.ts +80 -0
  11. package/lib/LcdpUeditor.js +268 -0
  12. package/lib/const.d.ts +12 -0
  13. package/lib/const.js +39 -0
  14. package/lib/defaultConfig.json +77 -0
  15. package/lib/index.d.ts +4 -0
  16. package/lib/index.js +41 -0
  17. package/lib/tools/UeditorResourceLoader.d.ts +21 -0
  18. package/lib/tools/UeditorResourceLoader.js +90 -0
  19. package/lib/tools/filterHtmlNode.d.ts +5 -0
  20. package/lib/tools/filterHtmlNode.js +61 -0
  21. package/lib/tools/loadScript.d.ts +5 -0
  22. package/lib/tools/loadScript.js +39 -0
  23. package/lib/type.d.ts +148 -0
  24. package/lib/type.js +17 -0
  25. package/package.json +32 -32
  26. package/ueditor-resource/dialogs/anchor/anchor.html +62 -62
  27. package/ueditor-resource/dialogs/attachment/attachment.css +716 -716
  28. package/ueditor-resource/dialogs/attachment/attachment.html +61 -61
  29. package/ueditor-resource/dialogs/attachment/attachment.js +803 -803
  30. package/ueditor-resource/dialogs/audio/audio.css +879 -879
  31. package/ueditor-resource/dialogs/audio/audio.html +93 -93
  32. package/ueditor-resource/dialogs/audio/audio.js +815 -815
  33. package/ueditor-resource/dialogs/background/background.css +193 -193
  34. package/ueditor-resource/dialogs/background/background.html +59 -59
  35. package/ueditor-resource/dialogs/background/background.js +370 -370
  36. package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -176
  37. package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -91
  38. package/ueditor-resource/dialogs/emotion/emotion.css +129 -129
  39. package/ueditor-resource/dialogs/emotion/emotion.html +70 -70
  40. package/ueditor-resource/dialogs/emotion/emotion.js +186 -186
  41. package/ueditor-resource/dialogs/formula/formula.html +98 -98
  42. package/ueditor-resource/dialogs/formula/formula.js +147 -147
  43. package/ueditor-resource/dialogs/help/help.css +37 -37
  44. package/ueditor-resource/dialogs/help/help.html +82 -82
  45. package/ueditor-resource/dialogs/help/help.js +57 -57
  46. package/ueditor-resource/dialogs/image/image.css +768 -768
  47. package/ueditor-resource/dialogs/image/image.html +144 -144
  48. package/ueditor-resource/dialogs/image/image.js +1060 -1060
  49. package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -135
  50. package/ueditor-resource/dialogs/internal.js +81 -81
  51. package/ueditor-resource/dialogs/link/link.html +148 -148
  52. package/ueditor-resource/dialogs/preview/preview.html +45 -45
  53. package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -324
  54. package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -95
  55. package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -682
  56. package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -144
  57. package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -174
  58. package/ueditor-resource/dialogs/spechars/spechars.html +42 -42
  59. package/ueditor-resource/dialogs/spechars/spechars.js +86 -86
  60. package/ueditor-resource/dialogs/table/edittable.css +85 -85
  61. package/ueditor-resource/dialogs/table/edittable.html +69 -69
  62. package/ueditor-resource/dialogs/table/edittable.js +241 -241
  63. package/ueditor-resource/dialogs/table/edittd.html +62 -62
  64. package/ueditor-resource/dialogs/table/edittip.html +33 -33
  65. package/ueditor-resource/dialogs/template/config.js +42 -42
  66. package/ueditor-resource/dialogs/template/template.css +99 -99
  67. package/ueditor-resource/dialogs/template/template.html +26 -26
  68. package/ueditor-resource/dialogs/template/template.js +53 -53
  69. package/ueditor-resource/dialogs/video/video.css +909 -909
  70. package/ueditor-resource/dialogs/video/video.html +114 -114
  71. package/ueditor-resource/dialogs/video/video.js +867 -867
  72. package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -221
  73. package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -93
  74. package/ueditor-resource/lang/en/en.js +686 -686
  75. package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -748
  76. package/ueditor-resource/lang/zh-tw/images/copy.png +0 -0
  77. package/ueditor-resource/lang/zh-tw/images/localimage.png +0 -0
  78. package/ueditor-resource/lang/zh-tw/images/music.png +0 -0
  79. package/ueditor-resource/lang/zh-tw/images/upload.png +0 -0
  80. package/ueditor-resource/lang/zh-tw/zh-tw.js +748 -0
  81. package/ueditor-resource/plugins/demo/demo.js +3 -3
  82. package/ueditor-resource/themes/default/css/ueditor.css +2148 -2148
  83. package/ueditor-resource/themes/default/dialog.css +17 -17
  84. package/ueditor-resource/themes/default/dialogbase.css +132 -132
  85. package/ueditor-resource/themes/default/exts/ai.svg +12 -12
  86. package/ueditor-resource/themes/default/exts/apk.svg +12 -12
  87. package/ueditor-resource/themes/default/exts/chm.svg +12 -12
  88. package/ueditor-resource/themes/default/exts/css.svg +12 -12
  89. package/ueditor-resource/themes/default/exts/doc.svg +22 -22
  90. package/ueditor-resource/themes/default/exts/docx.svg +22 -22
  91. package/ueditor-resource/themes/default/exts/dwg.svg +16 -16
  92. package/ueditor-resource/themes/default/exts/folder.svg +3 -3
  93. package/ueditor-resource/themes/default/exts/gif.svg +14 -14
  94. package/ueditor-resource/themes/default/exts/html.svg +12 -12
  95. package/ueditor-resource/themes/default/exts/jpeg.svg +14 -14
  96. package/ueditor-resource/themes/default/exts/jpg.svg +14 -14
  97. package/ueditor-resource/themes/default/exts/log.svg +12 -12
  98. package/ueditor-resource/themes/default/exts/mp3.svg +14 -14
  99. package/ueditor-resource/themes/default/exts/mp4.svg +12 -12
  100. package/ueditor-resource/themes/default/exts/pdf.svg +14 -14
  101. package/ueditor-resource/themes/default/exts/png.svg +14 -14
  102. package/ueditor-resource/themes/default/exts/ppt.svg +24 -24
  103. package/ueditor-resource/themes/default/exts/pptx.svg +24 -24
  104. package/ueditor-resource/themes/default/exts/psd.svg +12 -12
  105. package/ueditor-resource/themes/default/exts/rar.svg +12 -12
  106. package/ueditor-resource/themes/default/exts/svg.svg +12 -12
  107. package/ueditor-resource/themes/default/exts/torrent.svg +14 -14
  108. package/ueditor-resource/themes/default/exts/txt.svg +14 -14
  109. package/ueditor-resource/themes/default/exts/unknown.svg +12 -12
  110. package/ueditor-resource/themes/default/exts/xls.svg +25 -25
  111. package/ueditor-resource/themes/default/exts/xlsx.svg +25 -25
  112. package/ueditor-resource/themes/default/exts/zip.svg +12 -12
  113. package/ueditor-resource/themes/iframe.css +63 -63
  114. package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -3655
  115. package/ueditor-resource/third-party/clipboard/clipboard.js +752 -752
  116. package/ueditor-resource/third-party/codemirror/codemirror.css +106 -106
  117. package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -3581
  118. package/ueditor-resource/third-party/jquery-3.5.1.js +1 -1
  119. package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -4314
  120. package/ueditor-resource/third-party/webuploader/webuploader.css +88 -88
  121. package/ueditor-resource/third-party/webuploader/webuploader.js +3 -3
  122. package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1255 -1255
  123. package/ueditor-resource/ueditor.all.js +5271 -5270
  124. package/ueditor-resource/ueditor.config.js +655 -656
  125. package/ueditor-resource/ueditor.parse.js +13 -13
  126. package/es/LcdpUeditor.d.ts.map +0 -1
  127. package/es/const.d.ts.map +0 -1
  128. package/es/index.d.ts.map +0 -1
  129. package/es/tools/UeditorResourceLoader.d.ts.map +0 -1
  130. package/es/tools/loadScript.d.ts.map +0 -1
  131. package/es/type.d.ts.map +0 -1
  132. package/ueditor-resource/index.html +0 -146
@@ -1,148 +1,148 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <title></title>
6
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
7
- <script type="text/javascript" src="../internal.js?32939b8e"></script>
8
- <style type="text/css">
9
- * {
10
- margin: 0;
11
- padding: 0;
12
- color: #838383;
13
- }
14
-
15
- table {
16
- font-size: 12px;
17
- margin: 10px;
18
- line-height: 36px;
19
- width: 100%;
20
- }
21
-
22
- .txt {
23
- box-sizing: border-box;
24
- width: 90%;
25
- height: 30px;
26
- line-height: 30px;
27
- border: 1px solid #d7d7d7;
28
- border-radius: 3px;
29
- padding: 0 5px;
30
- outline: none;
31
- }
32
- </style>
33
- </head>
34
- <body>
35
- <div style="padding:10px;">
36
- <table>
37
- <tr>
38
- <td><label for="text"> <var id="lang_input_text"></var></label></td>
39
- <td><input class="txt" id="text" type="text" disabled="true"/></td>
40
- </tr>
41
- <tr>
42
- <td><label for="href"> <var id="lang_input_url"></var></label></td>
43
- <td><input class="txt" id="href" type="text"/></td>
44
- </tr>
45
- <tr>
46
- <td><label for="title"> <var id="lang_input_title"></var></label></td>
47
- <td><input class="txt" id="title" type="text"/></td>
48
- </tr>
49
- <tr>
50
- <td colspan="2">
51
- <label for="target"><var id="lang_input_target"></var></label>
52
- <input id="target" type="checkbox"/>
53
- </td>
54
- </tr>
55
- <tr>
56
- <td colspan="2" id="msg"></td>
57
- </tr>
58
- </table>
59
- </div>
60
- <script type="text/javascript">
61
-
62
- editor.setOpt('allowLinkProtocols', ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:']);
63
- var allowLinkProtocols = editor.getOpt('allowLinkProtocols');
64
-
65
- var range = editor.selection.getRange(),
66
- link = range.collapsed ? editor.queryCommandValue("link") : editor.selection.getStart(),
67
- url,
68
- text = $G('text'),
69
- rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(), 'a', true),
70
- orgText;
71
-
72
- link = domUtils.findParentByTagName(link, "a", true);
73
-
74
- if (link) {
75
- url = utils.html(link.getAttribute('_href') || link.getAttribute('href', 2));
76
-
77
- if (rangeLink === link && !link.getElementsByTagName('img').length) {
78
- text.removeAttribute('disabled');
79
- orgText = text.value = link[browser.ie ? 'innerText' : 'textContent'];
80
- } else {
81
- text.setAttribute('disabled', 'true');
82
- text.value = lang.validLink;
83
- }
84
-
85
- } else {
86
- if (range.collapsed) {
87
- text.removeAttribute('disabled');
88
- text.value = '';
89
- } else {
90
- text.setAttribute('disabled', 'true');
91
- text.value = lang.validLink;
92
- }
93
-
94
- }
95
- $G("title").value = url ? link.title : "";
96
- $G("href").value = url ? url : '';
97
- $G("target").checked = url && link.target == "_blank" ? true : false;
98
- $focus($G("href"));
99
-
100
- function handleDialogOk() {
101
- var href = $G('href').value.replace(/^\s+|\s+$/g, '');
102
- if (href) {
103
- var obj = {
104
- 'href': href,
105
- 'target': $G("target").checked ? "_blank" : '_self',
106
- 'title': $G("title").value.replace(/^\s+|\s+$/g, ''),
107
- '_href': href,
108
- };
109
- //修改链接内容的情况太特殊了,所以先做到这里了
110
- //todo:情况多的时候,做到command里
111
- if (orgText && text.value != orgText) {
112
- link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
113
- range.selectNode(link).select()
114
- }
115
- if (range.collapsed) {
116
- obj.textValue = text.value;
117
- }
118
- editor.execCommand('link', utils.clearEmptyAttrs(obj));
119
- dialog.close();
120
- }
121
- }
122
-
123
- dialog.onok = handleDialogOk;
124
- $G('href').onkeydown = $G('title').onkeydown = function (evt) {
125
- evt = evt || window.event;
126
- if (evt.keyCode == 13) {
127
- handleDialogOk();
128
- return false;
129
- }
130
- };
131
- $G('href').onblur = function () {
132
-
133
- };
134
-
135
- function hrefStartWith(href, arr) {
136
- href = href.replace(/^\s+|\s+$/g, '');
137
- for (var i = 0, ai; ai = arr[i++];) {
138
- if (href.indexOf(ai) == 0) {
139
- return true;
140
- }
141
- }
142
- return false;
143
- }
144
-
145
-
146
- </script>
147
- </body>
148
- </html>
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
+ "http://www.w3.org/TR/html4/loose.dtd">
3
+ <html>
4
+ <head>
5
+ <title></title>
6
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
7
+ <script type="text/javascript" src="../internal.js?32939b8e"></script>
8
+ <style type="text/css">
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ color: #838383;
13
+ }
14
+
15
+ table {
16
+ font-size: 12px;
17
+ margin: 10px;
18
+ line-height: 36px;
19
+ width: 100%;
20
+ }
21
+
22
+ .txt {
23
+ box-sizing: border-box;
24
+ width: 90%;
25
+ height: 30px;
26
+ line-height: 30px;
27
+ border: 1px solid #d7d7d7;
28
+ border-radius: 3px;
29
+ padding: 0 5px;
30
+ outline: none;
31
+ }
32
+ </style>
33
+ </head>
34
+ <body>
35
+ <div style="padding:10px;">
36
+ <table>
37
+ <tr>
38
+ <td><label for="text"> <var id="lang_input_text"></var></label></td>
39
+ <td><input class="txt" id="text" type="text" disabled="true"/></td>
40
+ </tr>
41
+ <tr>
42
+ <td><label for="href"> <var id="lang_input_url"></var></label></td>
43
+ <td><input class="txt" id="href" type="text"/></td>
44
+ </tr>
45
+ <tr>
46
+ <td><label for="title"> <var id="lang_input_title"></var></label></td>
47
+ <td><input class="txt" id="title" type="text"/></td>
48
+ </tr>
49
+ <tr>
50
+ <td colspan="2">
51
+ <label for="target"><var id="lang_input_target"></var></label>
52
+ <input id="target" type="checkbox"/>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td colspan="2" id="msg"></td>
57
+ </tr>
58
+ </table>
59
+ </div>
60
+ <script type="text/javascript">
61
+
62
+ editor.setOpt('allowLinkProtocols', ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:']);
63
+ var allowLinkProtocols = editor.getOpt('allowLinkProtocols');
64
+
65
+ var range = editor.selection.getRange(),
66
+ link = range.collapsed ? editor.queryCommandValue("link") : editor.selection.getStart(),
67
+ url,
68
+ text = $G('text'),
69
+ rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(), 'a', true),
70
+ orgText;
71
+
72
+ link = domUtils.findParentByTagName(link, "a", true);
73
+
74
+ if (link) {
75
+ url = utils.html(link.getAttribute('_href') || link.getAttribute('href', 2));
76
+
77
+ if (rangeLink === link && !link.getElementsByTagName('img').length) {
78
+ text.removeAttribute('disabled');
79
+ orgText = text.value = link[browser.ie ? 'innerText' : 'textContent'];
80
+ } else {
81
+ text.setAttribute('disabled', 'true');
82
+ text.value = lang.validLink;
83
+ }
84
+
85
+ } else {
86
+ if (range.collapsed) {
87
+ text.removeAttribute('disabled');
88
+ text.value = '';
89
+ } else {
90
+ text.setAttribute('disabled', 'true');
91
+ text.value = lang.validLink;
92
+ }
93
+
94
+ }
95
+ $G("title").value = url ? link.title : "";
96
+ $G("href").value = url ? url : '';
97
+ $G("target").checked = url && link.target == "_blank" ? true : false;
98
+ $focus($G("href"));
99
+
100
+ function handleDialogOk() {
101
+ var href = $G('href').value.replace(/^\s+|\s+$/g, '');
102
+ if (href) {
103
+ var obj = {
104
+ 'href': href,
105
+ 'target': $G("target").checked ? "_blank" : '_self',
106
+ 'title': $G("title").value.replace(/^\s+|\s+$/g, ''),
107
+ '_href': href,
108
+ };
109
+ //修改链接内容的情况太特殊了,所以先做到这里了
110
+ //todo:情况多的时候,做到command里
111
+ if (orgText && text.value != orgText) {
112
+ link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
113
+ range.selectNode(link).select()
114
+ }
115
+ if (range.collapsed) {
116
+ obj.textValue = text.value;
117
+ }
118
+ editor.execCommand('link', utils.clearEmptyAttrs(obj));
119
+ dialog.close();
120
+ }
121
+ }
122
+
123
+ dialog.onok = handleDialogOk;
124
+ $G('href').onkeydown = $G('title').onkeydown = function (evt) {
125
+ evt = evt || window.event;
126
+ if (evt.keyCode == 13) {
127
+ handleDialogOk();
128
+ return false;
129
+ }
130
+ };
131
+ $G('href').onblur = function () {
132
+
133
+ };
134
+
135
+ function hrefStartWith(href, arr) {
136
+ href = href.replace(/^\s+|\s+$/g, '');
137
+ for (var i = 0, ai; ai = arr[i++];) {
138
+ if (href.indexOf(ai) == 0) {
139
+ return true;
140
+ }
141
+ }
142
+ return false;
143
+ }
144
+
145
+
146
+ </script>
147
+ </body>
148
+ </html>
@@ -1,45 +1,45 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
- <style>
7
- html, body {
8
- height: 100%;
9
- width: 100%;
10
- padding: 0;
11
- margin: 0;
12
- }
13
-
14
- #preview {
15
- width: 100%;
16
- height: 100%;
17
- padding: 0;
18
- margin: 0;
19
- }
20
-
21
- #preview * {
22
- font-family: sans-serif;
23
- font-size: 16px;
24
- }
25
- </style>
26
- <script type="text/javascript" src="../internal.js?32939b8e"></script>
27
- <script src="../../ueditor.parse.js?8ec8e2ae"></script>
28
- <title></title>
29
- </head>
30
- <body class="view">
31
- <div id="preview" style="margin:8px">
32
-
33
- </div>
34
- </body>
35
- <script>
36
- document.getElementById('preview').innerHTML = editor.getContent();
37
- uParse('#preview', {
38
- rootPath: '../../',
39
- chartContainerHeight: 500
40
- })
41
- dialog.oncancel = function () {
42
- document.getElementById('preview').innerHTML = '';
43
- }
44
- </script>
45
- </html>
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
+ "http://www.w3.org/TR/html4/loose.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <style>
7
+ html, body {
8
+ height: 100%;
9
+ width: 100%;
10
+ padding: 0;
11
+ margin: 0;
12
+ }
13
+
14
+ #preview {
15
+ width: 100%;
16
+ height: 100%;
17
+ padding: 0;
18
+ margin: 0;
19
+ }
20
+
21
+ #preview * {
22
+ font-family: sans-serif;
23
+ font-size: 16px;
24
+ }
25
+ </style>
26
+ <script type="text/javascript" src="../internal.js?aea0c61c"></script>
27
+ <script src="../../ueditor.parse.js?081fdc89"></script>
28
+ <title></title>
29
+ </head>
30
+ <body class="view">
31
+ <div id="preview" style="margin:8px">
32
+
33
+ </div>
34
+ </body>
35
+ <script>
36
+ document.getElementById('preview').innerHTML = editor.getContent();
37
+ uParse('#preview', {
38
+ rootPath: '../../',
39
+ chartContainerHeight: 500
40
+ })
41
+ dialog.oncancel = function () {
42
+ document.getElementById('preview').innerHTML = '';
43
+ }
44
+ </script>
45
+ </html>