@lingxiteam/lcdp-ueditor-react 1.0.0-alpha.8 → 1.0.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 (117) hide show
  1. package/es/LcdpUeditor.js +64 -61
  2. package/es/const.js +4 -4
  3. package/es/defaultConfig.json +76 -76
  4. package/es/tools/UeditorResourceLoader.js +11 -16
  5. package/es/tools/filterHtmlNode.d.ts +5 -0
  6. package/es/tools/filterHtmlNode.js +41 -0
  7. package/es/tools/loadScript.js +5 -7
  8. package/es/type.d.ts +6 -0
  9. package/lib/LcdpUeditor.js +18 -8
  10. package/lib/defaultConfig.json +76 -76
  11. package/lib/tools/filterHtmlNode.d.ts +5 -0
  12. package/lib/tools/filterHtmlNode.js +61 -0
  13. package/lib/type.d.ts +6 -0
  14. package/package.json +35 -34
  15. package/ueditor-resource/dialogs/anchor/anchor.html +62 -62
  16. package/ueditor-resource/dialogs/attachment/attachment.css +716 -716
  17. package/ueditor-resource/dialogs/attachment/attachment.html +61 -61
  18. package/ueditor-resource/dialogs/attachment/attachment.js +803 -803
  19. package/ueditor-resource/dialogs/audio/audio.css +879 -879
  20. package/ueditor-resource/dialogs/audio/audio.html +93 -93
  21. package/ueditor-resource/dialogs/audio/audio.js +815 -815
  22. package/ueditor-resource/dialogs/background/background.css +193 -193
  23. package/ueditor-resource/dialogs/background/background.html +59 -59
  24. package/ueditor-resource/dialogs/background/background.js +370 -370
  25. package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -176
  26. package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -91
  27. package/ueditor-resource/dialogs/emotion/emotion.css +129 -129
  28. package/ueditor-resource/dialogs/emotion/emotion.html +70 -70
  29. package/ueditor-resource/dialogs/emotion/emotion.js +186 -186
  30. package/ueditor-resource/dialogs/formula/formula.html +98 -98
  31. package/ueditor-resource/dialogs/formula/formula.js +147 -147
  32. package/ueditor-resource/dialogs/help/help.css +37 -37
  33. package/ueditor-resource/dialogs/help/help.html +82 -82
  34. package/ueditor-resource/dialogs/help/help.js +57 -57
  35. package/ueditor-resource/dialogs/image/image.css +768 -768
  36. package/ueditor-resource/dialogs/image/image.html +144 -144
  37. package/ueditor-resource/dialogs/image/image.js +1060 -1060
  38. package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -135
  39. package/ueditor-resource/dialogs/internal.js +81 -81
  40. package/ueditor-resource/dialogs/link/link.html +148 -148
  41. package/ueditor-resource/dialogs/preview/preview.html +45 -45
  42. package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -324
  43. package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -95
  44. package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -682
  45. package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -144
  46. package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -174
  47. package/ueditor-resource/dialogs/spechars/spechars.html +42 -42
  48. package/ueditor-resource/dialogs/spechars/spechars.js +86 -86
  49. package/ueditor-resource/dialogs/table/edittable.css +85 -85
  50. package/ueditor-resource/dialogs/table/edittable.html +69 -69
  51. package/ueditor-resource/dialogs/table/edittable.js +241 -241
  52. package/ueditor-resource/dialogs/table/edittd.html +62 -62
  53. package/ueditor-resource/dialogs/table/edittip.html +33 -33
  54. package/ueditor-resource/dialogs/template/config.js +42 -42
  55. package/ueditor-resource/dialogs/template/template.css +99 -99
  56. package/ueditor-resource/dialogs/template/template.html +26 -26
  57. package/ueditor-resource/dialogs/template/template.js +53 -53
  58. package/ueditor-resource/dialogs/video/video.css +909 -909
  59. package/ueditor-resource/dialogs/video/video.html +114 -114
  60. package/ueditor-resource/dialogs/video/video.js +867 -867
  61. package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -221
  62. package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -93
  63. package/ueditor-resource/lang/en/en.js +686 -686
  64. package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -748
  65. package/ueditor-resource/lang/zh-tw/zh-tw.js +748 -748
  66. package/ueditor-resource/plugins/demo/demo.js +3 -3
  67. package/ueditor-resource/themes/default/css/ueditor.css +2148 -2148
  68. package/ueditor-resource/themes/default/dialog.css +17 -17
  69. package/ueditor-resource/themes/default/dialogbase.css +132 -132
  70. package/ueditor-resource/themes/default/exts/ai.svg +12 -12
  71. package/ueditor-resource/themes/default/exts/apk.svg +12 -12
  72. package/ueditor-resource/themes/default/exts/chm.svg +12 -12
  73. package/ueditor-resource/themes/default/exts/css.svg +12 -12
  74. package/ueditor-resource/themes/default/exts/doc.svg +22 -22
  75. package/ueditor-resource/themes/default/exts/docx.svg +22 -22
  76. package/ueditor-resource/themes/default/exts/dwg.svg +16 -16
  77. package/ueditor-resource/themes/default/exts/folder.svg +3 -3
  78. package/ueditor-resource/themes/default/exts/gif.svg +14 -14
  79. package/ueditor-resource/themes/default/exts/html.svg +12 -12
  80. package/ueditor-resource/themes/default/exts/jpeg.svg +14 -14
  81. package/ueditor-resource/themes/default/exts/jpg.svg +14 -14
  82. package/ueditor-resource/themes/default/exts/log.svg +12 -12
  83. package/ueditor-resource/themes/default/exts/mp3.svg +14 -14
  84. package/ueditor-resource/themes/default/exts/mp4.svg +12 -12
  85. package/ueditor-resource/themes/default/exts/pdf.svg +14 -14
  86. package/ueditor-resource/themes/default/exts/png.svg +14 -14
  87. package/ueditor-resource/themes/default/exts/ppt.svg +24 -24
  88. package/ueditor-resource/themes/default/exts/pptx.svg +24 -24
  89. package/ueditor-resource/themes/default/exts/psd.svg +12 -12
  90. package/ueditor-resource/themes/default/exts/rar.svg +12 -12
  91. package/ueditor-resource/themes/default/exts/svg.svg +12 -12
  92. package/ueditor-resource/themes/default/exts/torrent.svg +14 -14
  93. package/ueditor-resource/themes/default/exts/txt.svg +14 -14
  94. package/ueditor-resource/themes/default/exts/unknown.svg +12 -12
  95. package/ueditor-resource/themes/default/exts/xls.svg +25 -25
  96. package/ueditor-resource/themes/default/exts/xlsx.svg +25 -25
  97. package/ueditor-resource/themes/default/exts/zip.svg +12 -12
  98. package/ueditor-resource/themes/iframe.css +63 -63
  99. package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -3655
  100. package/ueditor-resource/third-party/clipboard/clipboard.js +752 -752
  101. package/ueditor-resource/third-party/codemirror/codemirror.css +106 -106
  102. package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -3581
  103. package/ueditor-resource/third-party/jquery-3.5.1.js +1 -1
  104. package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -4314
  105. package/ueditor-resource/third-party/webuploader/webuploader.css +88 -88
  106. package/ueditor-resource/third-party/webuploader/webuploader.js +3 -3
  107. package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1255 -1255
  108. package/ueditor-resource/ueditor.all.js +5271 -5270
  109. package/ueditor-resource/ueditor.config.js +655 -656
  110. package/ueditor-resource/ueditor.parse.js +13 -13
  111. package/es/LcdpUeditor.d.ts.map +0 -1
  112. package/es/const.d.ts.map +0 -1
  113. package/es/index.d.ts.map +0 -1
  114. package/es/tools/UeditorResourceLoader.d.ts.map +0 -1
  115. package/es/tools/loadScript.d.ts.map +0 -1
  116. package/es/type.d.ts.map +0 -1
  117. package/ueditor-resource/index.html +0 -146
@@ -36,7 +36,8 @@ var import_react = __toESM(require("react"));
36
36
  var import_const = require("./const");
37
37
  var import_defaultConfig = __toESM(require("./defaultConfig.json"));
38
38
  var import_UeditorResourceLoader = __toESM(require("./tools/UeditorResourceLoader"));
39
- var import_lodash = require("lodash");
39
+ var import_debounce = __toESM(require("lodash/debounce"));
40
+ var import_filterHtmlNode = require("./tools/filterHtmlNode");
40
41
  var LcdpUeditor = class extends import_react.default.Component {
41
42
  constructor(props) {
42
43
  super(props);
@@ -83,7 +84,8 @@ var LcdpUeditor = class extends import_react.default.Component {
83
84
  if (this.props.ueditorPath) {
84
85
  this.ueditorPath = this.props.ueditorPath;
85
86
  }
86
- this.currentContent = this.props.value;
87
+ const nextValue = (0, import_filterHtmlNode.filterHtmlNode)(this.props.value || "").str;
88
+ this.currentContent = nextValue;
87
89
  this.uploadFunction = (file, type) => {
88
90
  var _a;
89
91
  if (type === "image" && ((_a = this.props.config) == null ? void 0 : _a.imageType) === "base64") {
@@ -105,15 +107,17 @@ var LcdpUeditor = class extends import_react.default.Component {
105
107
  };
106
108
  this.editorConfig = {
107
109
  ...import_defaultConfig.default,
110
+ maximumWords: (config == null ? void 0 : config.maximumWords) || 1e4,
108
111
  initialFrameHeight: (config == null ? void 0 : config.height) || 300,
109
112
  autoHeightEnabled: false,
110
113
  selectCallback: (cb, type) => {
111
114
  this.fileSelect(cb, type);
112
115
  },
113
116
  uploadFunction: this.uploadFunction,
114
- initialContent: this.props.value
117
+ initialContent: nextValue || "",
118
+ pasteplain: (config == null ? void 0 : config.pasteplain) === true
115
119
  };
116
- this.debounceContentChange = (0, import_lodash.debounce)(this.onContentChange.bind(this), 300);
120
+ this.debounceContentChange = (0, import_debounce.default)(this.onContentChange.bind(this), 300);
117
121
  }
118
122
  componentDidMount() {
119
123
  this.initUeditor();
@@ -122,7 +126,7 @@ var LcdpUeditor = class extends import_react.default.Component {
122
126
  if (this.isReady) {
123
127
  if ("value" in nextProps && this.currentContent !== nextProps.value) {
124
128
  this.isReportFlag = false;
125
- this.ueditorInst.setContent(nextProps.value);
129
+ this.ueditorInst.setContent((0, import_filterHtmlNode.filterHtmlNode)(nextProps.value || "").str);
126
130
  }
127
131
  if (nextProps.disabled !== this.props.disabled) {
128
132
  if (nextProps.disabled) {
@@ -135,14 +139,17 @@ var LcdpUeditor = class extends import_react.default.Component {
135
139
  }
136
140
  componentWillUnmount() {
137
141
  var _a, _b;
138
- (_b = (_a = this.ueditorInst) == null ? void 0 : _a.destroy) == null ? void 0 : _b.call(_a);
142
+ if (this.isReady) {
143
+ (_b = (_a = this.ueditorInst) == null ? void 0 : _a.destroy) == null ? void 0 : _b.call(_a);
144
+ }
139
145
  }
140
146
  onContentChange() {
141
147
  if (!this.isReportFlag) {
142
148
  this.isReportFlag = true;
143
149
  } else if (this.props.onChange) {
144
- this.currentContent = this.ueditorInst.getContent();
145
- this.props.onChange(this.currentContent);
150
+ this.currentContent = this.ueditorInst.getContent() || "";
151
+ const { str, flag, source } = (0, import_filterHtmlNode.filterHtmlNode)(this.currentContent);
152
+ this.props.onChange(flag ? str : source);
146
153
  }
147
154
  }
148
155
  getExtString(str) {
@@ -220,6 +227,9 @@ var LcdpUeditor = class extends import_react.default.Component {
220
227
  */
221
228
  async initUeditor() {
222
229
  import_UeditorResourceLoader.default.onReady(() => {
230
+ if (this.props.toolbars) {
231
+ this.editorConfig.toolbars = this.props.toolbars;
232
+ }
223
233
  this.ueditorInst = window.UE.getEditor(this.containerId, this.editorConfig);
224
234
  this.ueditorInst.ready(() => {
225
235
  this.isReady = true;
@@ -1,77 +1,77 @@
1
- {
2
- "imageActionName": "image",
3
- "imageFieldName": "file",
4
- "imageMaxSize": 10485760,
5
- "imageAllowFiles": [
6
- ".jpg",
7
- ".png",
8
- ".jpeg"
9
- ],
10
- "imageCompressEnable": true,
11
- "imageCompressBorder": 5000,
12
- "imageInsertAlign": "none",
13
- "imageUrlPrefix": "",
14
- "scrawlActionName": "crawl",
15
- "scrawlFieldName": "file",
16
- "scrawlMaxSize": 10485760,
17
- "scrawlUrlPrefix": "",
18
- "scrawlInsertAlign": "none",
19
- "snapscreenActionName": "snap",
20
- "snapscreenUrlPrefix": "",
21
- "snapscreenInsertAlign": "none",
22
- "catcherLocalDomain": [
23
- "127.0.0.1",
24
- "localhost"
25
- ],
26
- "catcherActionName": "catch",
27
- "catcherFieldName": "source",
28
- "catcherUrlPrefix": "",
29
- "catcherMaxSize": 10485760,
30
- "catcherAllowFiles": [
31
- ".jpg",
32
- ".png",
33
- ".jpeg"
34
- ],
35
- "videoActionName": "video",
36
- "videoFieldName": "file",
37
- "videoUrlPrefix": "",
38
- "videoMaxSize": 104857600,
39
- "videoAllowFiles": [
40
- ".mp4",
41
- ".webm",
42
- ".mkv"
43
- ],
44
- "audioActionName": "audio",
45
- "audioFieldName": "file",
46
- "audioUrlPrefix": "",
47
- "audioMaxSize": 104857600,
48
- "audioAllowFiles": [
49
- ".mp3"
50
- ],
51
- "fileActionName": "file",
52
- "fileFieldName": "file",
53
- "fileUrlPrefix": "",
54
- "fileMaxSize": 104857600,
55
- "fileAllowFiles": [
56
- ".zip",
57
- ".pdf",
58
- ".doc"
59
- ],
60
- "imageManagerActionName": "listImage",
61
- "imageManagerListSize": 20,
62
- "imageManagerUrlPrefix": "",
63
- "imageManagerInsertAlign": "none",
64
- "imageManagerAllowFiles": [
65
- ".jpg",
66
- ".png",
67
- ".jpeg"
68
- ],
69
- "fileManagerActionName": "listFile",
70
- "fileManagerUrlPrefix": "",
71
- "fileManagerListSize": 20,
72
- "fileManagerAllowFiles": [
73
- ".zip",
74
- ".pdf",
75
- ".doc"
76
- ]
1
+ {
2
+ "imageActionName": "image",
3
+ "imageFieldName": "file",
4
+ "imageMaxSize": 10485760,
5
+ "imageAllowFiles": [
6
+ ".jpg",
7
+ ".png",
8
+ ".jpeg"
9
+ ],
10
+ "imageCompressEnable": true,
11
+ "imageCompressBorder": 5000,
12
+ "imageInsertAlign": "none",
13
+ "imageUrlPrefix": "",
14
+ "scrawlActionName": "crawl",
15
+ "scrawlFieldName": "file",
16
+ "scrawlMaxSize": 10485760,
17
+ "scrawlUrlPrefix": "",
18
+ "scrawlInsertAlign": "none",
19
+ "snapscreenActionName": "snap",
20
+ "snapscreenUrlPrefix": "",
21
+ "snapscreenInsertAlign": "none",
22
+ "catcherLocalDomain": [
23
+ "127.0.0.1",
24
+ "localhost"
25
+ ],
26
+ "catcherActionName": "catch",
27
+ "catcherFieldName": "source",
28
+ "catcherUrlPrefix": "",
29
+ "catcherMaxSize": 10485760,
30
+ "catcherAllowFiles": [
31
+ ".jpg",
32
+ ".png",
33
+ ".jpeg"
34
+ ],
35
+ "videoActionName": "video",
36
+ "videoFieldName": "file",
37
+ "videoUrlPrefix": "",
38
+ "videoMaxSize": 104857600,
39
+ "videoAllowFiles": [
40
+ ".mp4",
41
+ ".webm",
42
+ ".mkv"
43
+ ],
44
+ "audioActionName": "audio",
45
+ "audioFieldName": "file",
46
+ "audioUrlPrefix": "",
47
+ "audioMaxSize": 104857600,
48
+ "audioAllowFiles": [
49
+ ".mp3"
50
+ ],
51
+ "fileActionName": "file",
52
+ "fileFieldName": "file",
53
+ "fileUrlPrefix": "",
54
+ "fileMaxSize": 104857600,
55
+ "fileAllowFiles": [
56
+ ".zip",
57
+ ".pdf",
58
+ ".doc"
59
+ ],
60
+ "imageManagerActionName": "listImage",
61
+ "imageManagerListSize": 20,
62
+ "imageManagerUrlPrefix": "",
63
+ "imageManagerInsertAlign": "none",
64
+ "imageManagerAllowFiles": [
65
+ ".jpg",
66
+ ".png",
67
+ ".jpeg"
68
+ ],
69
+ "fileManagerActionName": "listFile",
70
+ "fileManagerUrlPrefix": "",
71
+ "fileManagerListSize": 20,
72
+ "fileManagerAllowFiles": [
73
+ ".zip",
74
+ ".pdf",
75
+ ".doc"
76
+ ]
77
77
  }
@@ -0,0 +1,5 @@
1
+ export declare const filterHtmlNode: (str: string) => {
2
+ str: string;
3
+ flag: boolean;
4
+ source: string;
5
+ };
@@ -0,0 +1,61 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/tools/filterHtmlNode.ts
20
+ var filterHtmlNode_exports = {};
21
+ __export(filterHtmlNode_exports, {
22
+ filterHtmlNode: () => filterHtmlNode
23
+ });
24
+ module.exports = __toCommonJS(filterHtmlNode_exports);
25
+ var filterHtmlNode = (str) => {
26
+ let flag = false;
27
+ if (typeof str !== "string")
28
+ return str || "";
29
+ const blacklist = ["script", "style", "iframe"];
30
+ const parser = new DOMParser();
31
+ const doc = parser.parseFromString(str, "text/html");
32
+ function cleanNode(node) {
33
+ var _a;
34
+ if (node.nodeType === 1) {
35
+ if (blacklist.indexOf(node.nodeName.toLowerCase()) !== -1) {
36
+ (_a = node.parentNode) == null ? void 0 : _a.removeChild(node);
37
+ return;
38
+ }
39
+ for (let i = node.attributes.length - 1; i >= 0; i -= 1) {
40
+ const attr = node.attributes[i];
41
+ if (attr.name.startsWith("on") || String(node.getAttribute(attr.name)).toLowerCase().indexOf("javascript:") !== -1) {
42
+ node.removeAttribute(attr.name);
43
+ flag = true;
44
+ }
45
+ }
46
+ }
47
+ for (let i = 0; i < node.childNodes.length; i += 1) {
48
+ cleanNode(node.childNodes[i]);
49
+ }
50
+ }
51
+ cleanNode(doc.body);
52
+ return {
53
+ str: doc.body.innerHTML,
54
+ flag,
55
+ source: str
56
+ };
57
+ };
58
+ // Annotate the CommonJS export names for ESM import in node:
59
+ 0 && (module.exports = {
60
+ filterHtmlNode
61
+ });
package/lib/type.d.ts CHANGED
@@ -23,6 +23,10 @@ export interface ILcdpUeditorProps {
23
23
  * 富文本配置
24
24
  */
25
25
  config?: {
26
+ /**
27
+ * 是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴 默认false
28
+ */
29
+ pasteplain?: boolean;
26
30
  /**
27
31
  * 编辑器高度 默认300px
28
32
  */
@@ -63,7 +67,9 @@ export interface ILcdpUeditorProps {
63
67
  * 上传视频格式限制
64
68
  */
65
69
  videoAllowFiles?: string[];
70
+ maximumWords?: number;
66
71
  };
72
+ toolbars?: string[][];
67
73
  /**
68
74
  * 语言 默认 zh-cn
69
75
  * zh-cn 中文 en 英文
package/package.json CHANGED
@@ -1,34 +1,35 @@
1
- {
2
- "name": "@lingxiteam/lcdp-ueditor-react",
3
- "version": "1.0.0-alpha.8",
4
- "module": "es/index.js",
5
- "main": "lib/index.js",
6
- "license": "MIT",
7
- "files": [
8
- "ueditor-resource",
9
- "es",
10
- "lib"
11
- ],
12
- "publishConfig": {
13
- "access": "public",
14
- "registry": "https://registry.npmjs.org/"
15
- },
16
- "types": "es/index.d.ts",
17
- "typings": "es/index.d.ts",
18
- "scripts": {
19
- "build": "father build",
20
- "dev": "father dev",
21
- "prepublishOnly": "npm run build && cd ../../ueditor-plus && npm run prepublish"
22
- },
23
- "peerDependencies": {
24
- "react": "^16.12.0 || ^17.0.0"
25
- },
26
- "dependencies": {
27
- "lodash": "^4.0.0"
28
- },
29
- "devDependencies": {
30
- "father": "^4.1.9",
31
- "@types/lodash": "^4.14.180"
32
- },
33
- "gitHead": "be7b48f706ff0186d2f2f42d59a25b4973f935d4"
34
- }
1
+ {
2
+ "name": "@lingxiteam/lcdp-ueditor-react",
3
+ "version": "1.0.1",
4
+ "license": "MIT",
5
+ "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "types": "es/index.d.ts",
8
+ "typings": "es/index.d.ts",
9
+ "files": [
10
+ "ueditor-resource",
11
+ "es",
12
+ "lib"
13
+ ],
14
+ "scripts": {
15
+ "build": "father build",
16
+ "dev": "father dev",
17
+ "prepublishOnly": "npm run build && cd ../../ueditor-plus && npm run prepublish"
18
+ },
19
+ "devDependencies": {
20
+ "@types/lodash": "^4.14.180",
21
+ "father": "^4.1.9"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "^16.12.0 || ^17.0.0",
25
+ "lodash": "^4.0.0"
26
+ },
27
+ "dependencies": {
28
+ "@babel/runtime": "7.23.2"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "registry": "https://registry.npmjs.org/"
33
+ },
34
+ "gitHead": "be7b48f706ff0186d2f2f42d59a25b4973f935d4"
35
+ }
@@ -1,62 +1,62 @@
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
- <title></title>
7
- <style type="text/css">
8
- * {
9
- color: #838383;
10
- margin: 0;
11
- padding: 0
12
- }
13
-
14
- html, body {
15
- font-size: 12px;
16
- overflow: hidden;
17
- }
18
-
19
- .content {
20
- padding: 5px 0 0 15px;
21
- }
22
-
23
- input {
24
- margin-left: 4px;
25
- box-sizing: border-box;
26
- width: 210px;
27
- height: 30px;
28
- line-height: 30px;
29
- border: 1px solid #d7d7d7;
30
- border-radius: 3px;
31
- padding: 0 5px;
32
- outline: none;
33
- }
34
- </style>
35
- </head>
36
- <body>
37
- <div class="content">
38
- <span><var id="lang_input_anchorName"></var></span><input id="anchorName" value=""/>
39
- </div>
40
- <script type="text/javascript" src="../internal.js?32939b8e"></script>
41
- <script type="text/javascript">
42
- var anchorInput = $G('anchorName'),
43
- node = editor.selection.getRange().getClosedNode();
44
- if (node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))) {
45
- anchorInput.value = node;
46
- }
47
- anchorInput.onkeydown = function (evt) {
48
- evt = evt || window.event;
49
- if (evt.keyCode == 13) {
50
- editor.execCommand('anchor', anchorInput.value);
51
- dialog.close();
52
- domUtils.preventDefault(evt)
53
- }
54
- };
55
- dialog.onok = function () {
56
- editor.execCommand('anchor', anchorInput.value);
57
- dialog.close();
58
- };
59
- $focus(anchorInput);
60
- </script>
61
- </body>
62
- </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
+ <title></title>
7
+ <style type="text/css">
8
+ * {
9
+ color: #838383;
10
+ margin: 0;
11
+ padding: 0
12
+ }
13
+
14
+ html, body {
15
+ font-size: 12px;
16
+ overflow: hidden;
17
+ }
18
+
19
+ .content {
20
+ padding: 5px 0 0 15px;
21
+ }
22
+
23
+ input {
24
+ margin-left: 4px;
25
+ box-sizing: border-box;
26
+ width: 210px;
27
+ height: 30px;
28
+ line-height: 30px;
29
+ border: 1px solid #d7d7d7;
30
+ border-radius: 3px;
31
+ padding: 0 5px;
32
+ outline: none;
33
+ }
34
+ </style>
35
+ </head>
36
+ <body>
37
+ <div class="content">
38
+ <span><var id="lang_input_anchorName"></var></span><input id="anchorName" value=""/>
39
+ </div>
40
+ <script type="text/javascript" src="../internal.js?aea0c61c"></script>
41
+ <script type="text/javascript">
42
+ var anchorInput = $G('anchorName'),
43
+ node = editor.selection.getRange().getClosedNode();
44
+ if (node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))) {
45
+ anchorInput.value = node;
46
+ }
47
+ anchorInput.onkeydown = function (evt) {
48
+ evt = evt || window.event;
49
+ if (evt.keyCode == 13) {
50
+ editor.execCommand('anchor', anchorInput.value);
51
+ dialog.close();
52
+ domUtils.preventDefault(evt)
53
+ }
54
+ };
55
+ dialog.onok = function () {
56
+ editor.execCommand('anchor', anchorInput.value);
57
+ dialog.close();
58
+ };
59
+ $focus(anchorInput);
60
+ </script>
61
+ </body>
62
+ </html>