@lingxiteam/lcdp-ueditor-react 1.0.0-alpha.1

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 (272) hide show
  1. package/es/LcdpUeditor.d.ts +74 -0
  2. package/es/LcdpUeditor.js +335 -0
  3. package/es/const.d.ts +12 -0
  4. package/es/const.js +19 -0
  5. package/es/defaultConfig.json +77 -0
  6. package/es/index.d.ts +4 -0
  7. package/es/index.js +3 -0
  8. package/es/tools/UeditorResourceLoader.d.ts +21 -0
  9. package/es/tools/UeditorResourceLoader.js +114 -0
  10. package/es/tools/loadScript.d.ts +5 -0
  11. package/es/tools/loadScript.js +54 -0
  12. package/es/type.d.ts +142 -0
  13. package/es/type.js +1 -0
  14. package/package.json +32 -0
  15. package/ueditor-resource/dialogs/anchor/anchor.html +62 -0
  16. package/ueditor-resource/dialogs/attachment/attachment.css +716 -0
  17. package/ueditor-resource/dialogs/attachment/attachment.html +61 -0
  18. package/ueditor-resource/dialogs/attachment/attachment.js +803 -0
  19. package/ueditor-resource/dialogs/attachment/images/alignicon.gif +0 -0
  20. package/ueditor-resource/dialogs/attachment/images/alignicon.png +0 -0
  21. package/ueditor-resource/dialogs/attachment/images/bg.png +0 -0
  22. package/ueditor-resource/dialogs/attachment/images/file-icons.gif +0 -0
  23. package/ueditor-resource/dialogs/attachment/images/file-icons.png +0 -0
  24. package/ueditor-resource/dialogs/attachment/images/icons.gif +0 -0
  25. package/ueditor-resource/dialogs/attachment/images/icons.png +0 -0
  26. package/ueditor-resource/dialogs/attachment/images/image.png +0 -0
  27. package/ueditor-resource/dialogs/attachment/images/progress.png +0 -0
  28. package/ueditor-resource/dialogs/attachment/images/success.gif +0 -0
  29. package/ueditor-resource/dialogs/attachment/images/success.png +0 -0
  30. package/ueditor-resource/dialogs/audio/audio.css +879 -0
  31. package/ueditor-resource/dialogs/audio/audio.html +94 -0
  32. package/ueditor-resource/dialogs/audio/audio.js +815 -0
  33. package/ueditor-resource/dialogs/audio/icon/center-active.png +0 -0
  34. package/ueditor-resource/dialogs/audio/icon/center.png +0 -0
  35. package/ueditor-resource/dialogs/audio/icon/img.png +0 -0
  36. package/ueditor-resource/dialogs/audio/icon/left-active.png +0 -0
  37. package/ueditor-resource/dialogs/audio/icon/left.png +0 -0
  38. package/ueditor-resource/dialogs/audio/icon/none-active.png +0 -0
  39. package/ueditor-resource/dialogs/audio/icon/none.png +0 -0
  40. package/ueditor-resource/dialogs/audio/icon/right-active.png +0 -0
  41. package/ueditor-resource/dialogs/audio/icon/right.png +0 -0
  42. package/ueditor-resource/dialogs/audio/images/bg.png +0 -0
  43. package/ueditor-resource/dialogs/audio/images/center_focus.jpg +0 -0
  44. package/ueditor-resource/dialogs/audio/images/file-icons.gif +0 -0
  45. package/ueditor-resource/dialogs/audio/images/file-icons.png +0 -0
  46. package/ueditor-resource/dialogs/audio/images/icons.gif +0 -0
  47. package/ueditor-resource/dialogs/audio/images/icons.png +0 -0
  48. package/ueditor-resource/dialogs/audio/images/image.png +0 -0
  49. package/ueditor-resource/dialogs/audio/images/left_focus.jpg +0 -0
  50. package/ueditor-resource/dialogs/audio/images/none_focus.jpg +0 -0
  51. package/ueditor-resource/dialogs/audio/images/progress.png +0 -0
  52. package/ueditor-resource/dialogs/audio/images/right_focus.jpg +0 -0
  53. package/ueditor-resource/dialogs/audio/images/success.gif +0 -0
  54. package/ueditor-resource/dialogs/audio/images/success.png +0 -0
  55. package/ueditor-resource/dialogs/background/background.css +193 -0
  56. package/ueditor-resource/dialogs/background/background.html +59 -0
  57. package/ueditor-resource/dialogs/background/background.js +370 -0
  58. package/ueditor-resource/dialogs/background/images/bg.png +0 -0
  59. package/ueditor-resource/dialogs/background/images/success.png +0 -0
  60. package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -0
  61. package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -0
  62. package/ueditor-resource/dialogs/emotion/emotion.css +129 -0
  63. package/ueditor-resource/dialogs/emotion/emotion.html +70 -0
  64. package/ueditor-resource/dialogs/emotion/emotion.js +186 -0
  65. package/ueditor-resource/dialogs/emotion/images/0.gif +0 -0
  66. package/ueditor-resource/dialogs/emotion/images/bface.gif +0 -0
  67. package/ueditor-resource/dialogs/emotion/images/cface.gif +0 -0
  68. package/ueditor-resource/dialogs/emotion/images/fface.gif +0 -0
  69. package/ueditor-resource/dialogs/emotion/images/jxface2.gif +0 -0
  70. package/ueditor-resource/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  71. package/ueditor-resource/dialogs/emotion/images/tface.gif +0 -0
  72. package/ueditor-resource/dialogs/emotion/images/wface.gif +0 -0
  73. package/ueditor-resource/dialogs/emotion/images/yface.gif +0 -0
  74. package/ueditor-resource/dialogs/formula/formula.html +98 -0
  75. package/ueditor-resource/dialogs/formula/formula.js +147 -0
  76. package/ueditor-resource/dialogs/help/help.css +37 -0
  77. package/ueditor-resource/dialogs/help/help.html +82 -0
  78. package/ueditor-resource/dialogs/help/help.js +57 -0
  79. package/ueditor-resource/dialogs/image/icon/center-active.png +0 -0
  80. package/ueditor-resource/dialogs/image/icon/center.png +0 -0
  81. package/ueditor-resource/dialogs/image/icon/img.png +0 -0
  82. package/ueditor-resource/dialogs/image/icon/left-active.png +0 -0
  83. package/ueditor-resource/dialogs/image/icon/left.png +0 -0
  84. package/ueditor-resource/dialogs/image/icon/none-active.png +0 -0
  85. package/ueditor-resource/dialogs/image/icon/none.png +0 -0
  86. package/ueditor-resource/dialogs/image/icon/right-active.png +0 -0
  87. package/ueditor-resource/dialogs/image/icon/right.png +0 -0
  88. package/ueditor-resource/dialogs/image/image.css +768 -0
  89. package/ueditor-resource/dialogs/image/image.html +145 -0
  90. package/ueditor-resource/dialogs/image/image.js +1060 -0
  91. package/ueditor-resource/dialogs/image/images/alignicon.jpg +0 -0
  92. package/ueditor-resource/dialogs/image/images/bg.png +0 -0
  93. package/ueditor-resource/dialogs/image/images/icons.gif +0 -0
  94. package/ueditor-resource/dialogs/image/images/icons.png +0 -0
  95. package/ueditor-resource/dialogs/image/images/image.png +0 -0
  96. package/ueditor-resource/dialogs/image/images/progress.png +0 -0
  97. package/ueditor-resource/dialogs/image/images/success.gif +0 -0
  98. package/ueditor-resource/dialogs/image/images/success.png +0 -0
  99. package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -0
  100. package/ueditor-resource/dialogs/internal.js +81 -0
  101. package/ueditor-resource/dialogs/link/link.html +148 -0
  102. package/ueditor-resource/dialogs/preview/preview.html +45 -0
  103. package/ueditor-resource/dialogs/scrawl/images/addimg.png +0 -0
  104. package/ueditor-resource/dialogs/scrawl/images/brush.png +0 -0
  105. package/ueditor-resource/dialogs/scrawl/images/delimg.png +0 -0
  106. package/ueditor-resource/dialogs/scrawl/images/delimgH.png +0 -0
  107. package/ueditor-resource/dialogs/scrawl/images/empty.png +0 -0
  108. package/ueditor-resource/dialogs/scrawl/images/emptyH.png +0 -0
  109. package/ueditor-resource/dialogs/scrawl/images/eraser.png +0 -0
  110. package/ueditor-resource/dialogs/scrawl/images/redo.png +0 -0
  111. package/ueditor-resource/dialogs/scrawl/images/redoH.png +0 -0
  112. package/ueditor-resource/dialogs/scrawl/images/scale.png +0 -0
  113. package/ueditor-resource/dialogs/scrawl/images/scaleH.png +0 -0
  114. package/ueditor-resource/dialogs/scrawl/images/size.png +0 -0
  115. package/ueditor-resource/dialogs/scrawl/images/undo.png +0 -0
  116. package/ueditor-resource/dialogs/scrawl/images/undoH.png +0 -0
  117. package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -0
  118. package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -0
  119. package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -0
  120. package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -0
  121. package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -0
  122. package/ueditor-resource/dialogs/spechars/spechars.html +42 -0
  123. package/ueditor-resource/dialogs/spechars/spechars.js +86 -0
  124. package/ueditor-resource/dialogs/table/dragicon.png +0 -0
  125. package/ueditor-resource/dialogs/table/edittable.css +85 -0
  126. package/ueditor-resource/dialogs/table/edittable.html +69 -0
  127. package/ueditor-resource/dialogs/table/edittable.js +241 -0
  128. package/ueditor-resource/dialogs/table/edittd.html +62 -0
  129. package/ueditor-resource/dialogs/table/edittip.html +33 -0
  130. package/ueditor-resource/dialogs/template/config.js +42 -0
  131. package/ueditor-resource/dialogs/template/images/bg.gif +0 -0
  132. package/ueditor-resource/dialogs/template/images/pre0.png +0 -0
  133. package/ueditor-resource/dialogs/template/images/pre1.png +0 -0
  134. package/ueditor-resource/dialogs/template/images/pre2.png +0 -0
  135. package/ueditor-resource/dialogs/template/images/pre3.png +0 -0
  136. package/ueditor-resource/dialogs/template/images/pre4.png +0 -0
  137. package/ueditor-resource/dialogs/template/template.css +99 -0
  138. package/ueditor-resource/dialogs/template/template.html +26 -0
  139. package/ueditor-resource/dialogs/template/template.js +53 -0
  140. package/ueditor-resource/dialogs/video/icon/center-active.png +0 -0
  141. package/ueditor-resource/dialogs/video/icon/center.png +0 -0
  142. package/ueditor-resource/dialogs/video/icon/img.png +0 -0
  143. package/ueditor-resource/dialogs/video/icon/left-active.png +0 -0
  144. package/ueditor-resource/dialogs/video/icon/left.png +0 -0
  145. package/ueditor-resource/dialogs/video/icon/none-active.png +0 -0
  146. package/ueditor-resource/dialogs/video/icon/none.png +0 -0
  147. package/ueditor-resource/dialogs/video/icon/right-active.png +0 -0
  148. package/ueditor-resource/dialogs/video/icon/right.png +0 -0
  149. package/ueditor-resource/dialogs/video/images/bg.png +0 -0
  150. package/ueditor-resource/dialogs/video/images/center_focus.jpg +0 -0
  151. package/ueditor-resource/dialogs/video/images/file-icons.gif +0 -0
  152. package/ueditor-resource/dialogs/video/images/file-icons.png +0 -0
  153. package/ueditor-resource/dialogs/video/images/icons.gif +0 -0
  154. package/ueditor-resource/dialogs/video/images/icons.png +0 -0
  155. package/ueditor-resource/dialogs/video/images/image.png +0 -0
  156. package/ueditor-resource/dialogs/video/images/left_focus.jpg +0 -0
  157. package/ueditor-resource/dialogs/video/images/none_focus.jpg +0 -0
  158. package/ueditor-resource/dialogs/video/images/progress.png +0 -0
  159. package/ueditor-resource/dialogs/video/images/right_focus.jpg +0 -0
  160. package/ueditor-resource/dialogs/video/images/success.gif +0 -0
  161. package/ueditor-resource/dialogs/video/images/success.png +0 -0
  162. package/ueditor-resource/dialogs/video/video.css +909 -0
  163. package/ueditor-resource/dialogs/video/video.html +115 -0
  164. package/ueditor-resource/dialogs/video/video.js +867 -0
  165. package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -0
  166. package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -0
  167. package/ueditor-resource/index.html +146 -0
  168. package/ueditor-resource/lang/en/en.js +686 -0
  169. package/ueditor-resource/lang/en/images/addimage.png +0 -0
  170. package/ueditor-resource/lang/en/images/alldeletebtnhoverskin.png +0 -0
  171. package/ueditor-resource/lang/en/images/alldeletebtnupskin.png +0 -0
  172. package/ueditor-resource/lang/en/images/background.png +0 -0
  173. package/ueditor-resource/lang/en/images/button.png +0 -0
  174. package/ueditor-resource/lang/en/images/copy.png +0 -0
  175. package/ueditor-resource/lang/en/images/deletedisable.png +0 -0
  176. package/ueditor-resource/lang/en/images/deleteenable.png +0 -0
  177. package/ueditor-resource/lang/en/images/listbackground.png +0 -0
  178. package/ueditor-resource/lang/en/images/localimage.png +0 -0
  179. package/ueditor-resource/lang/en/images/music.png +0 -0
  180. package/ueditor-resource/lang/en/images/rotateleftdisable.png +0 -0
  181. package/ueditor-resource/lang/en/images/rotateleftenable.png +0 -0
  182. package/ueditor-resource/lang/en/images/rotaterightdisable.png +0 -0
  183. package/ueditor-resource/lang/en/images/rotaterightenable.png +0 -0
  184. package/ueditor-resource/lang/en/images/upload.png +0 -0
  185. package/ueditor-resource/lang/zh-cn/images/copy.png +0 -0
  186. package/ueditor-resource/lang/zh-cn/images/localimage.png +0 -0
  187. package/ueditor-resource/lang/zh-cn/images/music.png +0 -0
  188. package/ueditor-resource/lang/zh-cn/images/upload.png +0 -0
  189. package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -0
  190. package/ueditor-resource/plugins/demo/demo.js +3 -0
  191. package/ueditor-resource/themes/default/css/ueditor.css +2148 -0
  192. package/ueditor-resource/themes/default/dialog.css +17 -0
  193. package/ueditor-resource/themes/default/dialogbase.css +132 -0
  194. package/ueditor-resource/themes/default/exts/ai.svg +12 -0
  195. package/ueditor-resource/themes/default/exts/apk.svg +12 -0
  196. package/ueditor-resource/themes/default/exts/chm.svg +12 -0
  197. package/ueditor-resource/themes/default/exts/css.svg +12 -0
  198. package/ueditor-resource/themes/default/exts/doc.svg +22 -0
  199. package/ueditor-resource/themes/default/exts/docx.svg +22 -0
  200. package/ueditor-resource/themes/default/exts/dwg.svg +16 -0
  201. package/ueditor-resource/themes/default/exts/folder.svg +3 -0
  202. package/ueditor-resource/themes/default/exts/gif.svg +14 -0
  203. package/ueditor-resource/themes/default/exts/html.svg +12 -0
  204. package/ueditor-resource/themes/default/exts/jpeg.svg +14 -0
  205. package/ueditor-resource/themes/default/exts/jpg.svg +14 -0
  206. package/ueditor-resource/themes/default/exts/log.svg +12 -0
  207. package/ueditor-resource/themes/default/exts/mp3.svg +14 -0
  208. package/ueditor-resource/themes/default/exts/mp4.svg +12 -0
  209. package/ueditor-resource/themes/default/exts/pdf.svg +14 -0
  210. package/ueditor-resource/themes/default/exts/png.svg +14 -0
  211. package/ueditor-resource/themes/default/exts/ppt.svg +24 -0
  212. package/ueditor-resource/themes/default/exts/pptx.svg +24 -0
  213. package/ueditor-resource/themes/default/exts/psd.svg +12 -0
  214. package/ueditor-resource/themes/default/exts/rar.svg +12 -0
  215. package/ueditor-resource/themes/default/exts/svg.svg +12 -0
  216. package/ueditor-resource/themes/default/exts/torrent.svg +14 -0
  217. package/ueditor-resource/themes/default/exts/txt.svg +14 -0
  218. package/ueditor-resource/themes/default/exts/unknown.svg +12 -0
  219. package/ueditor-resource/themes/default/exts/xls.svg +25 -0
  220. package/ueditor-resource/themes/default/exts/xlsx.svg +25 -0
  221. package/ueditor-resource/themes/default/exts/zip.svg +12 -0
  222. package/ueditor-resource/themes/default/images/anchor.gif +0 -0
  223. package/ueditor-resource/themes/default/images/arrow.png +0 -0
  224. package/ueditor-resource/themes/default/images/arrow_down.png +0 -0
  225. package/ueditor-resource/themes/default/images/arrow_up.png +0 -0
  226. package/ueditor-resource/themes/default/images/button-bg.gif +0 -0
  227. package/ueditor-resource/themes/default/images/cancelbutton.gif +0 -0
  228. package/ueditor-resource/themes/default/images/charts.png +0 -0
  229. package/ueditor-resource/themes/default/images/cursor_h.gif +0 -0
  230. package/ueditor-resource/themes/default/images/cursor_h.png +0 -0
  231. package/ueditor-resource/themes/default/images/cursor_v.gif +0 -0
  232. package/ueditor-resource/themes/default/images/cursor_v.png +0 -0
  233. package/ueditor-resource/themes/default/images/dialog-title-bg.png +0 -0
  234. package/ueditor-resource/themes/default/images/filescan.png +0 -0
  235. package/ueditor-resource/themes/default/images/highlighted.gif +0 -0
  236. package/ueditor-resource/themes/default/images/icons-all.gif +0 -0
  237. package/ueditor-resource/themes/default/images/icons.gif +0 -0
  238. package/ueditor-resource/themes/default/images/icons.png +0 -0
  239. package/ueditor-resource/themes/default/images/img-cracked.png +0 -0
  240. package/ueditor-resource/themes/default/images/loaderror.png +0 -0
  241. package/ueditor-resource/themes/default/images/loading.gif +0 -0
  242. package/ueditor-resource/themes/default/images/lock.gif +0 -0
  243. package/ueditor-resource/themes/default/images/neweditor-tab-bg.png +0 -0
  244. package/ueditor-resource/themes/default/images/pagebreak.gif +0 -0
  245. package/ueditor-resource/themes/default/images/scale.png +0 -0
  246. package/ueditor-resource/themes/default/images/sortable.png +0 -0
  247. package/ueditor-resource/themes/default/images/spacer.gif +0 -0
  248. package/ueditor-resource/themes/default/images/sparator_v.png +0 -0
  249. package/ueditor-resource/themes/default/images/table-cell-align.png +0 -0
  250. package/ueditor-resource/themes/default/images/tangram-colorpicker.png +0 -0
  251. package/ueditor-resource/themes/default/images/toolbar_bg.png +0 -0
  252. package/ueditor-resource/themes/default/images/unhighlighted.gif +0 -0
  253. package/ueditor-resource/themes/default/images/upload.png +0 -0
  254. package/ueditor-resource/themes/default/images/videologo.gif +0 -0
  255. package/ueditor-resource/themes/default/images/word.gif +0 -0
  256. package/ueditor-resource/themes/default/images/wordpaste.png +0 -0
  257. package/ueditor-resource/themes/iframe.css +63 -0
  258. package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -0
  259. package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
  260. package/ueditor-resource/third-party/clipboard/clipboard.js +753 -0
  261. package/ueditor-resource/third-party/clipboard/clipboard.swf +0 -0
  262. package/ueditor-resource/third-party/codemirror/codemirror.css +106 -0
  263. package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -0
  264. package/ueditor-resource/third-party/jquery-3.5.1.js +2 -0
  265. package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -0
  266. package/ueditor-resource/third-party/webuploader/webuploader.css +88 -0
  267. package/ueditor-resource/third-party/webuploader/webuploader.js +4 -0
  268. package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
  269. package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  270. package/ueditor-resource/ueditor.all.js +32643 -0
  271. package/ueditor-resource/ueditor.config.js +656 -0
  272. package/ueditor-resource/ueditor.parse.js +639 -0
@@ -0,0 +1,193 @@
1
+ .wrapper {
2
+ width: 424px;
3
+ margin: 10px auto;
4
+ zoom: 1;
5
+ position: relative
6
+ }
7
+
8
+ .tabbody {
9
+ height: 225px;
10
+ }
11
+
12
+ .tabbody .panel {
13
+ position: absolute;
14
+ width: 100%;
15
+ height: 100%;
16
+ background: #fff;
17
+ display: none;
18
+ }
19
+
20
+ .tabbody .focus {
21
+ display: block;
22
+ }
23
+
24
+ body {
25
+ font-size: 12px;
26
+ color: #888;
27
+ overflow: hidden;
28
+ }
29
+
30
+ input, label {
31
+ vertical-align: middle
32
+ }
33
+
34
+ .clear {
35
+ clear: both;
36
+ }
37
+
38
+ .pl {
39
+ padding-left: 18px;
40
+ padding-left: 23px \9;
41
+ }
42
+
43
+ #imageList {
44
+ width: 420px;
45
+ height: 215px;
46
+ margin-top: 10px;
47
+ overflow: hidden;
48
+ overflow-y: auto;
49
+ }
50
+
51
+ #imageList div {
52
+ float: left;
53
+ width: 100px;
54
+ height: 95px;
55
+ margin: 5px 10px;
56
+ }
57
+
58
+ #imageList img {
59
+ cursor: pointer;
60
+ border: 2px solid white;
61
+ }
62
+
63
+ .bgarea {
64
+ margin: 10px;
65
+ padding: 5px;
66
+ height: 84%;
67
+ border: 1px solid #A8A297;
68
+ }
69
+
70
+ .content div {
71
+ margin: 10px 0 10px 5px;
72
+ }
73
+
74
+ .content .iptradio {
75
+ margin: 0px 5px 5px 0px;
76
+ }
77
+
78
+ .txt {
79
+ width: 280px;
80
+ }
81
+
82
+ .wrapcolor {
83
+ height: 19px;
84
+ }
85
+
86
+ div.color {
87
+ float: left;
88
+ margin: 0;
89
+ }
90
+
91
+ #colorPicker {
92
+ width: 17px;
93
+ height: 17px;
94
+ border: 1px solid #CCC;
95
+ display: inline-block;
96
+ border-radius: 3px;
97
+ box-shadow: 2px 2px 5px #D3D6DA;
98
+ margin: 0;
99
+ float: left;
100
+ }
101
+
102
+ div.alignment, #custom {
103
+ margin-left: 23px;
104
+ margin-left: 28px \9;
105
+ }
106
+
107
+ #custom input {
108
+ height: 15px;
109
+ min-height: 15px;
110
+ width: 20px;
111
+ }
112
+
113
+ #repeatType {
114
+ width: 100px;
115
+ }
116
+
117
+
118
+ /* 图片管理样式 */
119
+ #imgManager {
120
+ width: 100%;
121
+ height: 225px;
122
+ }
123
+
124
+ #imgManager #imageList {
125
+ width: 100%;
126
+ overflow-x: hidden;
127
+ overflow-y: auto;
128
+ }
129
+
130
+ #imgManager ul {
131
+ display: block;
132
+ list-style: none;
133
+ margin: 0;
134
+ padding: 0;
135
+ }
136
+
137
+ #imgManager li {
138
+ float: left;
139
+ display: block;
140
+ list-style: none;
141
+ padding: 0;
142
+ width: 113px;
143
+ height: 113px;
144
+ margin: 9px 0 0 19px;
145
+ background-color: #eee;
146
+ overflow: hidden;
147
+ cursor: pointer;
148
+ position: relative;
149
+ }
150
+
151
+ #imgManager li.clearFloat {
152
+ float: none;
153
+ clear: both;
154
+ display: block;
155
+ width: 0;
156
+ height: 0;
157
+ margin: 0;
158
+ padding: 0;
159
+ }
160
+
161
+ #imgManager li img {
162
+ cursor: pointer;
163
+ }
164
+
165
+ #imgManager li .icon {
166
+ cursor: pointer;
167
+ width: 113px;
168
+ height: 113px;
169
+ position: absolute;
170
+ top: 0;
171
+ left: 0;
172
+ z-index: 2;
173
+ border: 0;
174
+ background-repeat: no-repeat;
175
+ }
176
+
177
+ #imgManager li .icon:hover {
178
+ width: 107px;
179
+ height: 107px;
180
+ border: 3px solid #1094fa;
181
+ }
182
+
183
+ #imgManager li.selected .icon {
184
+ background-image: url(images/success.png);
185
+ background-position: 75px 75px;
186
+ }
187
+
188
+ #imgManager li.selected .icon:hover {
189
+ width: 107px;
190
+ height: 107px;
191
+ border: 3px solid #1094fa;
192
+ background-position: 72px 72px;
193
+ }
@@ -0,0 +1,59 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
5
+ <script type="text/javascript" src="../internal.js?32939b8e"></script>
6
+ <link rel="stylesheet" type="text/css" href="background.css?399b33ed">
7
+ </head>
8
+ <body>
9
+ <div id="bg_container" class="wrapper">
10
+ <div id="tabHeads" class="tabhead">
11
+ <span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
12
+ </div>
13
+ <div id="tabBodys" class="tabbody">
14
+ <div id="normal" class="panel focus">
15
+ <fieldset class="bgarea">
16
+ <legend><var id="lang_background_set"></var></legend>
17
+ <div class="content">
18
+ <div>
19
+ <label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none"
20
+ checked="checked"><var id="lang_background_none"></var></label>
21
+ <label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var
22
+ id="lang_background_colored"></var></label>
23
+ </div>
24
+ <div class="wrapcolor pl">
25
+ <div class="color">
26
+ <var id="lang_background_color"></var>:
27
+ </div>
28
+ <div id="colorPicker"></div>
29
+ <div class="clear"></div>
30
+ </div>
31
+ <div class="wrapcolor pl">
32
+ <label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
33
+ </div>
34
+ <div id="alignment" class="alignment">
35
+ <var id="lang_background_align"></var>:<select id="repeatType">
36
+ <option value="center"></option>
37
+ <option value="repeat-x"></option>
38
+ <option value="repeat-y"></option>
39
+ <option value="repeat"></option>
40
+ <option value="self"></option>
41
+ </select>
42
+ </div>
43
+ <div id="custom">
44
+ <var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4"
45
+ value="0">px&nbsp;&nbsp;y:<input type="text"
46
+ size="1"
47
+ id="y"
48
+ maxlength="4"
49
+ value="0">px
50
+ </div>
51
+ </div>
52
+ </fieldset>
53
+
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <script type="text/javascript" src="background.js?1ed7635f"></script>
58
+ </body>
59
+ </html>
@@ -0,0 +1,370 @@
1
+ (function () {
2
+
3
+ var onlineImage,
4
+ backupStyle = editor.queryCommandValue('background');
5
+
6
+ window.onload = function () {
7
+ initTabs();
8
+ initColorSelector();
9
+ };
10
+
11
+ /* 初始化tab标签 */
12
+ function initTabs() {
13
+ var tabs = $G('tabHeads').children;
14
+ for (var i = 0; i < tabs.length; i++) {
15
+ domUtils.on(tabs[i], "click", function (e) {
16
+ var target = e.target || e.srcElement;
17
+ for (var j = 0; j < tabs.length; j++) {
18
+ if (tabs[j] == target) {
19
+ tabs[j].className = "focus";
20
+ var contentId = tabs[j].getAttribute('data-content-id');
21
+ $G(contentId).style.display = "block";
22
+ } else {
23
+ tabs[j].className = "";
24
+ $G(tabs[j].getAttribute('data-content-id')).style.display = "none";
25
+ }
26
+ }
27
+ });
28
+ }
29
+ }
30
+
31
+ /* 初始化颜色设置 */
32
+ function initColorSelector() {
33
+ var obj = editor.queryCommandValue('background');
34
+ if (obj) {
35
+ var color = obj['background-color'],
36
+ repeat = obj['background-repeat'] || 'repeat',
37
+ image = obj['background-image'] || '',
38
+ position = obj['background-position'] || 'center center',
39
+ pos = position.split(' '),
40
+ x = parseInt(pos[0]) || 0,
41
+ y = parseInt(pos[1]) || 0;
42
+
43
+ if (repeat == 'no-repeat' && (x || y)) repeat = 'self';
44
+
45
+ image = image.match(/url[\s]*\(([^\)]*)\)/);
46
+ image = image ? image[1] : '';
47
+ updateFormState('colored', color, image, repeat, x, y);
48
+ } else {
49
+ updateFormState();
50
+ }
51
+
52
+ var updateHandler = function () {
53
+ updateFormState();
54
+ updateBackground();
55
+ }
56
+ domUtils.on($G('nocolorRadio'), 'click', updateBackground);
57
+ domUtils.on($G('coloredRadio'), 'click', updateHandler);
58
+ domUtils.on($G('url'), 'keyup', function () {
59
+ if ($G('url').value && $G('alignment').style.display == "none") {
60
+ utils.each($G('repeatType').children, function (item) {
61
+ item.selected = ('repeat' == item.getAttribute('value') ? 'selected' : false);
62
+ });
63
+ }
64
+ updateHandler();
65
+ });
66
+ domUtils.on($G('repeatType'), 'change', updateHandler);
67
+ domUtils.on($G('x'), 'keyup', updateBackground);
68
+ domUtils.on($G('y'), 'keyup', updateBackground);
69
+
70
+ initColorPicker();
71
+ }
72
+
73
+ /* 初始化颜色选择器 */
74
+ function initColorPicker() {
75
+ var me = editor,
76
+ cp = $G("colorPicker");
77
+
78
+ /* 生成颜色选择器ui对象 */
79
+ var popup = new UE.ui.Popup({
80
+ content: new UE.ui.ColorPicker({
81
+ noColorText: me.getLang("clearColor"),
82
+ editor: me,
83
+ onpickcolor: function (t, color) {
84
+ updateFormState('colored', color);
85
+ updateBackground();
86
+ UE.ui.Popup.postHide();
87
+ },
88
+ onpicknocolor: function (t, color) {
89
+ updateFormState('colored', 'transparent');
90
+ updateBackground();
91
+ UE.ui.Popup.postHide();
92
+ }
93
+ }),
94
+ editor: me,
95
+ onhide: function () {
96
+ }
97
+ });
98
+
99
+ /* 设置颜色选择器 */
100
+ domUtils.on(cp, "click", function () {
101
+ popup.showAnchor(this);
102
+ });
103
+ domUtils.on(document, 'mousedown', function (evt) {
104
+ var el = evt.target || evt.srcElement;
105
+ UE.ui.Popup.postHide(el);
106
+ });
107
+ domUtils.on(window, 'scroll', function () {
108
+ UE.ui.Popup.postHide();
109
+ });
110
+ }
111
+
112
+ /* 更新背景色设置面板 */
113
+ function updateFormState(radio, color, url, align, x, y) {
114
+ var nocolorRadio = $G('nocolorRadio'),
115
+ coloredRadio = $G('coloredRadio');
116
+
117
+ if (radio) {
118
+ nocolorRadio.checked = (radio == 'colored' ? false : 'checked');
119
+ coloredRadio.checked = (radio == 'colored' ? 'checked' : false);
120
+ }
121
+ if (color) {
122
+ domUtils.setStyle($G("colorPicker"), "background-color", color);
123
+ }
124
+
125
+ if (url && /^\//.test(url)) {
126
+ var a = document.createElement('a');
127
+ a.href = url;
128
+ browser.ie && (a.href = a.href);
129
+ url = browser.ie ? a.href : (a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
130
+ }
131
+
132
+ if (url || url === '') {
133
+ $G('url').value = url;
134
+ }
135
+ if (align) {
136
+ utils.each($G('repeatType').children, function (item) {
137
+ item.selected = (align == item.getAttribute('value') ? 'selected' : false);
138
+ });
139
+ }
140
+ if (x || y) {
141
+ $G('x').value = parseInt(x) || 0;
142
+ $G('y').value = parseInt(y) || 0;
143
+ }
144
+
145
+ $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '' : 'none';
146
+ $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '' : 'none';
147
+ }
148
+
149
+ /* 更新背景颜色 */
150
+ function updateBackground() {
151
+ if ($G('coloredRadio').checked) {
152
+ var color = domUtils.getStyle($G("colorPicker"), "background-color"),
153
+ bgimg = $G("url").value,
154
+ align = $G("repeatType").value,
155
+ backgroundObj = {
156
+ "background-repeat": "no-repeat",
157
+ "background-position": "center center"
158
+ };
159
+
160
+ if (color) backgroundObj["background-color"] = color;
161
+ if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
162
+ if (align == 'self') {
163
+ backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
164
+ } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
165
+ backgroundObj["background-repeat"] = align;
166
+ }
167
+
168
+ editor.execCommand('background', backgroundObj);
169
+ } else {
170
+ editor.execCommand('background', null);
171
+ }
172
+ }
173
+
174
+
175
+ /* 在线图片 */
176
+ function OnlineImage(target) {
177
+ this.container = utils.isString(target) ? document.getElementById(target) : target;
178
+ this.init();
179
+ }
180
+
181
+ OnlineImage.prototype = {
182
+ init: function () {
183
+ this.reset();
184
+ this.initEvents();
185
+ },
186
+ /* 初始化容器 */
187
+ initContainer: function () {
188
+ this.container.innerHTML = '';
189
+ this.list = document.createElement('ul');
190
+ this.clearFloat = document.createElement('li');
191
+
192
+ domUtils.addClass(this.list, 'list');
193
+ domUtils.addClass(this.clearFloat, 'clearFloat');
194
+
195
+ this.list.id = 'imageListUl';
196
+ this.list.appendChild(this.clearFloat);
197
+ this.container.appendChild(this.list);
198
+ },
199
+ /* 初始化滚动事件,滚动到地步自动拉取数据 */
200
+ initEvents: function () {
201
+ var _this = this;
202
+
203
+ /* 滚动拉取图片 */
204
+ domUtils.on($G('imageList'), 'scroll', function (e) {
205
+ var panel = this;
206
+ if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
207
+ _this.getImageData();
208
+ }
209
+ });
210
+ /* 选中图片 */
211
+ domUtils.on(this.container, 'click', function (e) {
212
+ var target = e.target || e.srcElement,
213
+ li = target.parentNode,
214
+ nodes = $G('imageListUl').childNodes;
215
+
216
+ if (li.tagName.toLowerCase() == 'li') {
217
+ updateFormState('nocolor', null, '');
218
+ for (var i = 0, node; node = nodes[i++];) {
219
+ if (node == li && !domUtils.hasClass(node, 'selected')) {
220
+ domUtils.addClass(node, 'selected');
221
+ updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat');
222
+ } else {
223
+ domUtils.removeClasses(node, 'selected');
224
+ }
225
+ }
226
+ updateBackground();
227
+ }
228
+ });
229
+ },
230
+ /* 初始化第一次的数据 */
231
+ initData: function () {
232
+
233
+ /* 拉取数据需要使用的值 */
234
+ this.state = 0;
235
+ this.listSize = editor.getOpt('imageManagerListSize');
236
+ this.listIndex = 0;
237
+ this.listEnd = false;
238
+
239
+ /* 第一次拉取数据 */
240
+ this.getImageData();
241
+ },
242
+ /* 重置界面 */
243
+ reset: function () {
244
+ this.initContainer();
245
+ this.initData();
246
+ },
247
+ /* 向后台拉取图片列表数据 */
248
+ getImageData: function () {
249
+ var _this = this;
250
+
251
+ if (!_this.listEnd && !this.isLoadingData) {
252
+ this.isLoadingData = true;
253
+ var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
254
+ isJsonp = utils.isCrossDomainUrl(url);
255
+ ajax.request(url, {
256
+ 'timeout': 100000,
257
+ 'dataType': isJsonp ? 'jsonp' : '',
258
+ 'data': utils.extend({
259
+ start: this.listIndex,
260
+ size: this.listSize
261
+ }, editor.queryCommandValue('serverparam')),
262
+ 'headers': editor.options.serverHeaders || {},
263
+ 'method': 'get',
264
+ 'onsuccess': function (r) {
265
+ try {
266
+ var json = isJsonp ? r : eval('(' + r.responseText + ')');
267
+ if (json.state == 'SUCCESS') {
268
+ _this.pushData(json.list);
269
+ _this.listIndex = parseInt(json.start) + parseInt(json.list.length);
270
+ if (_this.listIndex >= json.total) {
271
+ _this.listEnd = true;
272
+ }
273
+ _this.isLoadingData = false;
274
+ }
275
+ } catch (e) {
276
+ if (r.responseText.indexOf('ue_separate_ue') != -1) {
277
+ var list = r.responseText.split(r.responseText);
278
+ _this.pushData(list);
279
+ _this.listIndex = parseInt(list.length);
280
+ _this.listEnd = true;
281
+ _this.isLoadingData = false;
282
+ }
283
+ }
284
+ },
285
+ 'onerror': function () {
286
+ _this.isLoadingData = false;
287
+ }
288
+ });
289
+ }
290
+ },
291
+ /* 添加图片到列表界面上 */
292
+ pushData: function (list) {
293
+ var i, item, img, icon, _this = this,
294
+ urlPrefix = editor.getOpt('imageManagerUrlPrefix');
295
+ for (i = 0; i < list.length; i++) {
296
+ if (list[i] && list[i].url) {
297
+ item = document.createElement('li');
298
+ img = document.createElement('img');
299
+ icon = document.createElement('span');
300
+
301
+ domUtils.on(img, 'load', (function (image) {
302
+ return function () {
303
+ _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
304
+ }
305
+ })(img));
306
+ img.width = 113;
307
+ img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=' : '&noCache=') + (+new Date()).toString(36));
308
+ img.setAttribute('_src', urlPrefix + list[i].url);
309
+ domUtils.addClass(icon, 'icon');
310
+
311
+ item.appendChild(img);
312
+ item.appendChild(icon);
313
+ this.list.insertBefore(item, this.clearFloat);
314
+ }
315
+ }
316
+ },
317
+ /* 改变图片大小 */
318
+ scale: function (img, w, h, type) {
319
+ var ow = img.width,
320
+ oh = img.height;
321
+
322
+ if (type == 'justify') {
323
+ if (ow >= oh) {
324
+ img.width = w;
325
+ img.height = h * oh / ow;
326
+ img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
327
+ } else {
328
+ img.width = w * ow / oh;
329
+ img.height = h;
330
+ img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
331
+ }
332
+ } else {
333
+ if (ow >= oh) {
334
+ img.width = w * ow / oh;
335
+ img.height = h;
336
+ img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
337
+ } else {
338
+ img.width = w;
339
+ img.height = h * oh / ow;
340
+ img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
341
+ }
342
+ }
343
+ },
344
+ getInsertList: function () {
345
+ var i, lis = this.list.children, list = [], align = getAlign();
346
+ for (i = 0; i < lis.length; i++) {
347
+ if (domUtils.hasClass(lis[i], 'selected')) {
348
+ var img = lis[i].firstChild,
349
+ src = img.getAttribute('_src');
350
+ list.push({
351
+ src: src,
352
+ _src: src,
353
+ floatStyle: align
354
+ });
355
+ }
356
+
357
+ }
358
+ return list;
359
+ }
360
+ };
361
+
362
+ dialog.onok = function () {
363
+ updateBackground();
364
+ editor.fireEvent('saveScene');
365
+ };
366
+ dialog.oncancel = function () {
367
+ editor.execCommand('background', backupStyle);
368
+ };
369
+
370
+ })();