@jx3box/jx3box-editor 1.9.6 → 1.9.8

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.
@@ -1,22 +1,27 @@
1
1
  import $ from "jquery";
2
2
  import { iconLink } from "@jx3box/jx3box-common/js/utils";
3
3
 
4
- function renderCombo(selector = ".e-skill-combo .w-skill-combo-item") {
4
+ function renderCombo(selector = ".e-skill-combo") {
5
5
  try {
6
- let html = ''
7
- $(selector).each(function(i, ele) {
6
+ $(selector).each(function (i, ele) {
8
7
  // 获取嵌入源地址
9
- let url = $(this).text();
8
+ let html = ''
10
9
 
11
- // extend = {gcd: 0}
12
- const [id, name, icon, extend] = url.split(",");
13
- // 去除左右花括号
10
+ let children = $(this).children();
14
11
 
15
-
16
- const _extend = extend ? JSON.parse(extend) : null;
12
+ console.log(children)
17
13
 
18
- // 渲染
19
- let code = `
14
+ children.each(function (i, ele) {
15
+ let url = $(this).text();
16
+
17
+ // extend = {gcd: 0}
18
+ const [id, name, icon, extend] = url.split(",");
19
+ // 去除左右花括号
20
+
21
+ const _extend = extend ? JSON.parse(extend) : null;
22
+
23
+ // 渲染
24
+ let code = `
20
25
  <span class="w-skill-combo-item">
21
26
  <img class="u-skill-icon" src="${iconLink(icon)}" alt="${icon}" title="${name}" />
22
27
  <span class="u-skill-name" title="${name}">${name}</span>
@@ -25,14 +30,12 @@ function renderCombo(selector = ".e-skill-combo .w-skill-combo-item") {
25
30
  </i>
26
31
  </span>
27
32
  `;
28
- html += code;
33
+ html += code;
34
+ });
35
+ // 挂载点
36
+ $(this).html(html);
29
37
  });
30
-
31
- // console.log(html)
32
-
33
- // 挂载点
34
- $(selector).parent().html(html);
35
- } catch(e) {
38
+ } catch (e) {
36
39
  console.log(e)
37
40
  }
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,7 +7,7 @@
7
7
  <meta name="renderer" content="webkit" />
8
8
  <title><%= htmlWebpackPlugin.options.title %></title>
9
9
  <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
10
- <script src="https://oss.jx3box.com/static/tinymce/tinymce.min.js?v=1.8.9"></script>
10
+ <script src="https://cdn.jx3box.com/static/tinymce/tinymce.min.js?v=1.8.9"></script>
11
11
  <!-- TODO: -->
12
12
  <!-- <script src="http://localhost:3000/tinymce.min.js"></script> -->
13
13
  </head>
package/src/Tinymce.vue CHANGED
@@ -63,7 +63,7 @@ export default {
63
63
 
64
64
  // 样式
65
65
  // TODO:
66
- content_css: process.env.VUE_APP_DEV_COMPONENT == 'true' ? '/css/article.css' : `https://oss.jx3box.com/static/jx3box-editor/css/article.css`,
66
+ content_css: process.env.VUE_APP_DEV_COMPONENT == 'true' ? '/css/article.css' : `https://cdn.jx3box.com/static/jx3box-editor/css/article.css`,
67
67
  // content_css: `http://localhost:3000/skins/content/default/content.min.css`,
68
68
  body_class: "c-article c-article-editor c-article-tinymce",
69
69
  height: this.height || 800,